MapBuilder: Import of Shapefile in Oracle Spatial failed: ORA-00947
I'm trying to use the MapBuilder 11 g to import a .shp file.I'm their import to a pre-existing table and column SDO_GEOMETRY.
I have two file types different .shp, 8307 SRID and 4326.
When you try to import a file any SRID 8307 Shapefiles, I get the message: ORA-00913 too many values for each record # tried to convert
When you try to import some SRID 8307 and SRID 4326 files, I get the message: ORA-00947: not enough values for each record # tried to convert
I was not able to import any .shp successfully yet.
Is there a problem with the .shp file, or is it another problem?
Thank you!
It is possible that pre-existing table definitions differ from those in shapefiles. for example, the database table is something like
roads)
number of road_id
road_name varchar2 (64).
the sdo_geometry form)
While the shp and dbf file corresponding
road_id, road_name, road_length, form
Too many values error
Interchanging the two defs should give not enough values error
Load the shapefile into a new table. Does it work. If Yes, then copy the new table in that pre-existing and delete a new.
E.g. roads shapefiles loading in the new table roads_shp (road_id, road_name, road_length, shape)
Insert the roads select road_id, road_name, roads_shp form.
drop table roads_shp;
Tags: Fusion Middleware
Similar Questions
-
Hi all,
I have a DVD with Shapefile OS RedHat and Oracle 10 g R2 (Shapefile is a popular geospatial vector format for geographic information systems software).
A "shapefile" is a set of files with ".shp", ".shx", ".dbf", ".prj".
Everyfile in the DVD is identified by:
00.dbf.gz
00.prj.gz
00.SHP.gz
00.SHx.gz
01.dbf.gz
01.prj.gz
01.SHP.gz
01.SHx.gz
...
I have about 3 GB of these files. I have to import this shapefile in Oracle.
Can you help me for this import?
Thank you in advance.You need not fusion middleware to run MapBuilder.
MapBuilder is a thick client to stand alone and it connect directly to the DB.Siva
-
Package oracle.spatial does not exist in NetBeans
Hi all,
I installed Oracle 11 g R2. I installed Netbeans 6.8. Everything on Red Hat Enterprise 5.
I am doing a project in Netbeans using the oracle.spatial package. So I imported this package if:
Oracle.spatial import. *;
But netbeans says that this package does not exist.
Listening port is active.
Database is in place.
NetBeans is already connected to Oracle with driver oracle.jdbc.OracleDriver.
I put the classpath in the project: I added the ojdbc6.jar of jar file in the project libraries.
What do you think of this problem?
Thanks in advance for the help.I don't know much about Java. But I am sure that there should be a utility that can help you locate the jar file where oracle spatial package exists. You can add this JARto your classpath or something.
-
Import the layer of ESRI file in Oracle Spatial database
For my current project, all geographical data are stored in files in ESRI layer. I want to convert SDO_GEOMETRY type and load into the Oracle Spatial database. I checked the OTN site, they provided a utility to load the shapefiles to ESRI in Oracle Spatial database, which does not work for my files from ESRI layer. Does anyone know how to convert a layer of ESRI file? I Googled it and can't find any useful information. Thanks for the help!FME will take care of it. It is a commercial product of SAFE, but you can get a trial version 30 days on their web site. I have used this method on several projects, I saw the.
Ivan
-
Hello
Am getting error below when ESRI shapefile running in the oracle database table.,.
C:\ > java - cp G:\app\product\11.2.0\dbhome_1\jdbc\lib\ojdbc14.jar; G:\app\product\
11.2.0\dbhome_1\md\jlib\sdoutl-1.0.jar;\g:\app\product\11.2.0\dbhome_1\md\jlib\s
doapi - 1.0.jar oracle.spatial.util.SampleShapefileToJGeomFeature localhost h Pei
Forms - sn of 1521 orcl u MDSYS selva d t f F:\saptial\Africa.shp - r 8307 - g ge
ometry
Error: Could not find or load the class main oracle.spatial.util.SampleShapefileToJGeomFeature
Uses the java version
C:\ > java-version
Java version "1.7.0_51".
Java (TM) SE Runtime Environment (build 1.7.0_51 - b13)
The Client Java VM (build 24.51 - b03, mixed mode, sharing)
And also tried in MapBuilder sound fine work., but I need to import java utility assistance help me too this.,.
I tried below in this way and solved problem.,.
Until I downloaded
sdoutl - 11.2.0.jar and sdoapi - 11.2.0.jar used to import a shp file...
C:\>set ORACLE_HOME=G:\app\product\11.2.0\dbhome_1
C:\Users\SELVA>CD downloads
C:\Users\SELVA\Downloads>CD statplanet_zambia
Card C:\Users\SELVA\Downloads\StatPlanet_Zambia>CD
located in a particular way and my oracle home
C:\Users\SELVA\Downloads\StatPlanet_Zambia\map>set ORACLE_HOME=G:\app\product\11.2.0\dbhome_1
C:\Users\SELVA\Downloads\StatPlanet_Zambia\map>java - classpath %ORACLE_HOME%\jdb
c\lib\ojdbc5.jar;%O RACLE_HOME%\md\jlib\sdoutl-11.2.0.jar;%O RACLE_HOME%\md\jlib\sdoapi-11.2.0.jar oracle.spatial.util.SampleShapefileToJGeomFeature h localhost Pei 1521 - orcl u MDSYS selva t Zambia SF map geometry 8307 d - g - r
Host: localhost
Port: 1521
SID: orcl
db_username: MDSYS
DB_PASSWORD: selva
db_tablename: Zambia
shapefile_name: map
SRID: 8307
db_geometry_column: geometry
Connection using Oracle10g...
localhost, 1521, orcl, MDSYS, selva, Zambia, map, null, 8307
Old table of fall...
java.sql.SQLException: ORA-00942: table or view does not exist
Creating a new table...
9 response (s) converted.
Fact.
Thank you
Selva
-
How to find the ANGLE b/w two edges in Oracle Spatial
How to find the ANGLE b/w two edges on Oracle Spatial. I have two edge connected on the same node. I wanted to know the angle betwwn them. Can someone help me?Ok. My first example is an approximation. Further you get North or South of the Ecuador, gets the more vague.
This one should do the trick with some degree of precision.declare PI constant number := 3.14159265358979; g1 sdo_geometry; g2 sdo_geometry; g3 sdo_geometry; angle1 number; angle2 number; FUNCTION POINT(P_LAT IN number ,P_LONG IN number) RETURN MDSYS.SDO_GEOMETRY IS BEGIN -- we load both the ordinate array and the point type because some spatial functions show inconsistent behavior -- it is not important for this example, just something to be aware of return(mdsys.sdo_geometry(2001,8307 -- WGS84 ,mdsys.sdo_point_type(p_long,p_lat,null) ,mdsys.sdo_elem_info_array(1,2,1) ,mdsys.sdo_ordinate_array(p_long,p_lat))); END; begin -- For the example, project in WGS84 -- g1,g2,g3 could also come straight out of the database as sdo_geometry g1 := point(50, 7); -- Point A g2 := point(51, 7); -- Point B g3 := point(50,10); -- Point C angle1 := atan2(g2.sdo_point.x - g1.sdo_point.x, g2.sdo_point.y - g1.sdo_point.y); angle2 := atan2(g3.sdo_point.x - g1.sdo_point.x, g3.sdo_point.y - g1.sdo_point.y); -- depending on rotation and where we are on the planet, adjustments may be needed if angle1 < 0 then angle1 := angle1 + 2 * PI; end if; if angle2 < 0 then angle2 := angle2 + 2 * PI; end if; if angle2 < angle1 then angle2 := angle2 + 2 * PI; end if; dbms_output.put_line('Angle between the lines A-B and A-C: '|| round(sdo_util.convert_unit(angle2-angle1,'Radian','Degree'),1)); end;
Angle between the lines A-B and A-C: 90
-
PostGis data .xls to load into Oracle spatial.
Hi all
Data extracted on postGis data in a .csv
Load data into Oracle Spatial 10 G R/2, this conversion to SDO_GEOMTERY compatible!
Object LOCATION
POINT (151.176476484116 - 33.8052644650542)
B POINT (151.206652660049 - 33.8739804536964)
C POINT (151.119743998673 - 33.7843109035407)
D POINT (151.199837258644 - 33.8860405175587)
E POINT(151.174838115067-33.8106921744621)
F POINT (151.295093932928 - 33.7306503576515)
G POINT (151.670928051977 - 30.4974655838254)
H POINT (151.092489089026 - 33.6829842680288)
I POINT (151.09253200437 - 33.6836270576402)
How to load this .xls in oracle and transform the place in sdo_geometryHello
You can use sql loader or an external table to import your data.
As your location data are in WKT format, it will be easier to use a temp. table (tmp_obj_loc).
It might be easier to add ',' as delimiters between each column in your data.The following example uses sqlldr (the temporary table can be created as an external table):
-- create a temp. table to hold your location info. drop table tmp_obj_loc ; create table tmp_obj_loc ( obj varchar(20), loc varchar2(200) );
-- sqlldr example -- use a control file if needed -- this creates the temp table options (skip = 1) load data infile * into table tmp_obj_loc fields terminated by ',' (obj , loc ) BEGINDATA Object LOCATION A, POINT(151.176476484116 -33.8052644650542) B, POINT(151.206652660049 -33.8739804536964) C, POINT(151.119743998673 -33.7843109035407) D, POINT(151.199837258644 -33.8860405175587) E, POINT(151.174838115067 -33.8106921744621) F, POINT(151.295093932928 -33.7306503576515) G, POINT(151.670928051977 -30.4974655838254) H, POINT(151.092489089026 -33.6829842680288) I, POINT(151.09253200437 -33.6836270576402)
-- create your location table with sdo_geometry from the temp table -- 8307 is the SRID, replace if needed drop table object_location; create table object_location as select obj object, sdo_geometry(loc,8307) location from tmp_obj_loc; desc object_location ; select count(*) from object_location;
Jack
-
Extrude 3D polygons in Oracle spatial
Dear all,
I have two sets of the footprint of City data imported into the Oracle Spatial already. One is a polygon with x 2D layer and there, and the other is a layer of polygons 3D with z values (x and are identical to the first).
Now, I am trying to extrude 3D for composite 3D polygon based on the value of z. I can extrude the 2D polygons with success with specifying the heights of soil (for example sdo_ordinate_array (0)) and topheights (say, sdo_ordinate_array (20.0)).
However, how extrude the specified polygon 3D taking the z value of each vertex as the heights of floor at a higher height is a problem for me. Since I am very new to use PL/SQL, besides, I'm not sure if it's possible to do.
Here are examples of data extracted the data from the sample:
Select sample.geom.sdo_ordinates in the sample sample2d_polygon
NUMBER (715202.739577727,733492.909091357,715206.759608945,733492.412077086,715208.666575034,733506.889047512,715204.72752625,733507.364066093,715202.739577727,733492.909091357)
Select sample.geom.sdo_ordinates in the sample sample3d_polygon
NUMBER(715202.739577727,733492.909091357,12.4890003204346,715206.759608945,733492.412077086,12.4890003204346,715208.666575034,733506.889047512,12.4540004730225,715204.72752625,733507.364066093,12.4320001602173,715202.739577727,733492.909091357,12.4890003204346)
Can someone help me with this
Select sdo_util.extrude (sample.geom, sdo_ordinate_array(), sdo_ordinate_array (20.0), 'true', 0.05) sample2d_polygon sample, where the first sdo_ordinate_array is the corresponding z value of the Summit?
Any suggestion is expected and appreciated.
Sincerely
JunHi Jun, -.
I hope that the following code solves your problem.
Please make sure also your geometries are valid by using sdo_geom.validate_geometry_with_context or
sdo_geom.validate_layer_with_context for 3D geometries.
Please let us know if you have any questions.
Best
Barisdrop table myGeoms; drop table extruded_myGeoms; create table myGeoms(i number, geom sdo_geometry); insert into myGeoms(i, geom) values(1, MDSYS.SDO_GEOMETRY(3003, null,null, MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,1), MDSYS.sdo_ordinate_array( 715202.739577727,733492.909091357,12.4890003204346, 715206.759608945,733492.412077086,12.4890003204346, 715208.666575034,733506.889047512,12.4540004730225, 715204.72752625, 733507.364066093,12.4320001602173, 715202.739577727,733492.909091357,12.4890003204346 ))); insert into myGeoms(i, geom) values(2, MDSYS.SDO_GEOMETRY(3003, null,null, MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,1), MDSYS.sdo_ordinate_array( 715202.739577727,733492.909091357,14.4890003204346, 715206.759608945,733492.412077086,14.4890003204346, 715208.666575034,733506.889047512,14.4540004730225, 715204.72752625, 733507.364066093,14.4320001602173, 715202.739577727,733492.909091357,14.4890003204346 ))); insert into myGeoms(i, geom) values(3, mdsys.sdo_geometry(3003, null, null, mdsys.sdo_elem_info_array(1,1003,1), mdsys.sdo_ordinate_array(1,1,10, 0,1,10, 0,0,10, 1,0,10, 1,1,10)) ); create table extruded_myGeoms(id number, geom sdo_geometry); -- This program assumes that each geometry in myGeoms table -- has only 1 ring per polygon ie, 1003 etype element. set serveroutput on; declare type cursor_type is REF CURSOR; query_crs cursor_type ; -- For each extruded geometry (result), this array has the ground heights ords_bottom_z_array sdo_number_array := null; -- For each extruded geometry (result), this array has the top heights which is set to 20 for each element. -- Both arrays must have the same number of elements. ords_top_z_array sdo_number_array := null; ords2d mdsys.sdo_ordinate_array := null; result sdo_geometry; g1 sdo_geometry; g2d sdo_geometry; stmt varchar2(100); id1 number; cnt integer; k integer; l integer; the_dim number; gtype_2d number; begin stmt := ' select i, geom from myGeoms '; OPEN query_crs FOR stmt; LOOP BEGIN FETCH query_crs into id1, g1; EXIT when query_crs%NOTFOUND ; ords2d := mdsys.sdo_ordinate_array(); ords_bottom_z_array := SDO_NUMBER_ARRAY(); ords_top_z_array := SDO_NUMBER_ARRAY(); k:=ords_bottom_z_array.count; l:=ords2d.count; FOR cnt in 1..g1.sdo_ordinates.count LOOP if (mod(cnt, 3) = 0) then -- Get z values of polygon ords_bottom_z_array.extend(1); ords_top_z_array.extend(1); k:=k+1; ords_bottom_z_array(k) := g1.sdo_ordinates(cnt); ords_top_z_array(k) := 20.0; -- Constant else -- To have 2D geometry for input to sdo_util.extrude ords2d.extend(1); l := l+1; ords2d(l) := g1.sdo_ordinates(cnt); end if; end loop; the_dim := floor(g1.sdo_gtype / 1000); gtype_2d := (the_dim-1)*1000 + mod(g1.sdo_gtype, 10); g2d:= sdo_geometry(gtype_2d, null, null, mdsys.sdo_elem_info_array(1,1003,1), ords2d); result:= sdo_util.extrude(g2d, ords_bottom_z_array, ords_top_z_array, 'FALSE', 0.05); -- insert the extruded geometry (result) into new table insert into extruded_myGeoms(id, geom) values(id1, result); dbms_output.put_line('id = '||id1); END; END LOOP; end; /
-
Given Oracle Spatial are stored in the database tables?
Given Oracle Spatial are stored in the database tables?Oracle spatial is DBMS oracle server functionality. It allows you in NATIVE mode, store and manage all standard types of spatial data and their attributes and metadata in the oracle database enterprise, in the way that you are quite familiar with. on top of standard oracle database features, adds types of geographic data, spatial index, geometric operators and queries, functions, spatial and analytical, to name a few.
MapViewer is a feature of Oracle Fusion Middleware, which makes cards using spatial data managed by Oracle Spatial. That's what you called "generator of maps. but of course, it's not just a map generator, he has much more to offer, such as MapBuilder, WMS, Oracle cards.
For more information, please see the technical details:
http://www.Oracle.com/technology//products/spatial/index.html
http://www.Oracle.com/technology/products/MapViewer/index.html -
Import the schema in oracle 10G
I had imported schema oracle 10g to oracle 7 s. but I found that all the tables are imported.
When I looked in the log file, I found the message below.
->
IMP-00003: ORACLE error 1659
ORA-01659: impossible to allocate MINEXTENTS beyond 10 in the CCD_DATA tablespace
IMP-00017: statement failed with error ORACLE 1917:
< -.
Could someone help me in this issue.
Thanks in advance.
VijayORA-01659: impossible to allocate MINEXTENTS beyond 10 in the CCD_DATA tablespace
Increase storage space (resizing existing datafile) or add the data file to CCD_DATA
-
Original title: update Windows problem on Vista 64-bit
My Windows Update repeat me that there are 11 important to install updates. It fails whenever I have try running with 80070490, Code and Code 80073712 error.
I tried the Windows analysis tool, the difficulty it tool Microsoft and the web site Microsoft Fix It I have have also run a registry cleaner and that he would follow the instructions of Microsoft to solve the problem of Windows Update by editing the registry, but I get 'Access denied' when ordering fast, even though I checked all permissions.
The updates are:
Update for Windows Vista for x 64-based systems (KB972145)
Update for Windows Vista for x 64-based systems (KB2633952)
Security Update for Microsoft .NET Framework 2.0 SP2 on Windows Vista SP2 and Windows Server 2008 SP2 for x 64 (KB2572075)
Update security for Windows Vista for x 64-based systems (KB2564958)
Update for Windows Vista for x 64-based systems (KB970430)
Update security for Windows Vista for x 64-based systems (KB2378111)
Windows PowerShell 2.0 and WinRM 2.0 for Windows Vista for x 64-based systems (KB968930)
Update for Windows Vista for x 64-based systems (KB2345886)
Update security for Windows Vista for x 64-based systems (KB967723)
A security update for .NET Framework 3.5 SP1, Windows Vista SP2 and Windows Server 2008 SP2 for x 64 systems (KB2518866)
Security Update for Microsoft .NET Framework 2.0 SP2 on Windows Vista SP2 and Windows Server 2008 SP2 for x 64 (KB2633874)I realize that these are not critical updates, but am concerned that, if there is a problem with the update, it will not refresh the critical updates either.
Any help would be greatly appreciated. Thank you.
Etherlass
Hello again,
Thought I would let you know that I've finally sorted this! :)
In another forum I read a post from someone who had a similar problem and solved it by uninstalling the "failures" updated, restart the PC and then re-run the update. It worked! It had not occurred to me to try what I've assumed that 'impossible' meant that they had not installed at all, not that they didn't had simply not installed correctly and must have become corrupt.
I hope this will help someone else who has the same problem, I've had!
Best wishes
Etherlass
-
Electrodes for Oracle spatial 11.2.0.4.0
What patches are needed for Oracle spatial 11.2.0.4.0?
I don't know what kind of response you expect an open question...
Simply apply the last power supply and go from there.
Bryan
-
Find the minimum distance between two SDO_GEOMETRY in Oracle Spatial?
A circle (SDO_GEOMETRY)
B - polygon (SDO_GEOMETRY)CASE:
B contains A (or)
The Interior of B.How to find the minimum distance between A and B in Oracle Spatial
Hello guuid nameless person.
What is
my_answer := MDSYS.SDO_GEOM.SDO_DISTANCE( my_circle_geometry ,MDSYS.SDO_UTIL.POLYGONTOLINE(my_outer_polygon) ,my_tolerance );
Now, you may need to pay attention to the holes in your polygon, would you the distance and an inner ring if it was closer to you?
If the measure is only to outer rings, so something like
my_answer := MDSYS.SDO_GEOM.SDO_DISTANCE( my_circle_geometry ,MDSYS.SDO_UTIL.POLYGONTOLINE( MDSYS.SDO_UTIL.EXTRACT(my_outer_polygon,1,1) ) ,my_tolerance );
And then also beware of the multipolygons as the foregoing only measured against the first polygon in the MultiPolygon. You need to loop through the polygons of tests just the outer ring in this case.
See you soon,.
Paul
-
I am new to oracle spatial and GIS in general. I have a customer who requires diapers space oracle to create in the environment of ESRI ArcSDE.
anyone can guide me please?
Hello
When you create a new class of functionality using ArcCatalog (ESRI ArcGIS Desktop software), you can set the configuration to "SDO_GEOMETRY. This new layer will be saved with ArcSDE system tables and stored in an oracle spatial format.
of course, you must have activated in your Oracle Spatial database.
you will find many technical articles on the web on this topic.
Kind regards
-
Hi all
I create a portfolio of oracle and everything works fine until a script is launched by the OS oracle user. (same user that whoever created the store)
I use authentication external store and inside my script, I do something like a sqlplus / @MYSECURE_TNS.
However, when I run a script OS another user as a 'data_loading_user' I get the error: Oracle Database Vault ORA-12578 connection error: TNS:wallet open failed
I would like to know, how I can activate any user on the local host access the portfolio safe to connect to the database.
Here my current ENV:
==================
Oracle Linux 6.5
Oracle a Standard 11.2.0.4
Webtier Oracle 11g
Database and thin client SQLNET. ORA
=============================
SQLNET. WALLET_OVERRIDE = TRUE
SSL_CLIENT_AUTHENTICATION = FALSE
SSL_VERSION = 0
WALLET_LOCATION =
(SOURCE =
(METHOD = FILE)
(METHOD_DATA =
(DIRECTORY = / u01/app/oracle/owm/wallets)
)
)
Thanks in advance for any help.
JS
Hi all
Tried something out of the blue, that has worked.
I added the data_loading_user of the user to the group administrator (Group of BONES that created the wallet).
The I added the read permission to the group, so the permission on the files below were 640:
# > chmod 640 cwallet.sso
# > 640ewallet.p12 chmod
Thank you
JS
Maybe you are looking for
-
Satellite A300 - his stutters when I enable Wi - FI turns
Hello! I am owner of a Satellite A300, and almost from the beginning, I noticed some occasional stuttering on the sound. Really got me bugged with this question, and I tried several times to solve. I even got to the point of resetting the default com
-
HP hewlett packard Tablet: administrator password or power password HP Tablet HP
Hello. I bought a Tablet HP Hewlett-Packard in good will but when I try to turn on the device an administrator password wonder, and after failing 3 times, the device gives me this code 94062100, honestly I want to just format and start using the devi
-
Playback of digital input [FPGA] - NI 9401 - questions?
I'm having some trouble with the digital input NI 9401, which is to have a uniform reading. I have a photogate that power of a digital output is turned off and goes in to a digital input module, but I can't read the entry several times. My LED flashe
-
I'm trying to manipulate the second and third columns of the tree, but I can't for the life of me understand how write (or even read) to any column other than the first. It doesn't seem to be a real good examples out there, and I've exhausted all the
-
Subtraction of loop between two bays
IM pretty bad at this naked language with me. I have a table 1 d of eight values and another 1 d array of lets say 800 values. I would like to remove the first element in the first table in the first 100 items in the second table, then the second ele