Problem in creating Spatial indexes
HelloI am creating the Spatial index on my service. In vain.
I created the function:
create or replace
FUNCTION VRAT_GEOMETRII (NUMBER obj_id)
MDSYS RETURN. SDO_GEOMETRY
DETERMINISTIC
as
MDSYS test1. SDO_GEOMETRY;
Mt VARCHAR2 (32767).
BEGIN
MT: =' SELECT SDO_PC_PKG. () TO_GEOMETRY
points,
num_points,
3) from pc_blktab2 WHERE obj_id =' | OBJ_ID;
EXECUTE IMMEDIATE Mt INTO test1;
Test1 RETURN;
END;
Updated metadata to update:
INSERT INTO user_sdo_geom_metadata)
TABLE_NAME,
COLUMN_NAME,
DIMINFO,
SRID)
VALUES)
"PC_BLKTAB2,"
' st_mkara. VRAT_GEOMETRII (obj_id)',
() SDO_DIM_ARRAY
SDO_DIM_ELEMENT ('X', 930000000,1200000000, 10),
SDO_DIM_ELEMENT('Y',420000000,930000000,10),
SDO_DIM_ELEMENT ('Z', 0,1600000, 10)
),
NULL - SRID VALUE
);
and I want to create the spatial index:
CREATE INDEX test_blok3_idx
ON PC_BLKTAB2 (VRAT_GEOMETRII (obj_id))
INDEXTYPE IS MDSYS. SPATIAL_INDEX;
but these errors:
Error report:
SQL error: ORA-29855: error when executing routine ODCIINDEXCREATE
ORA-13249: internal error in the Spatial index: [mdidxrbd]
ORA-13249: error in the Spatial index: index build failed
ORA-13249: error in the spatial index: [mdrcrtxfergm]
ORA-13249: error in the spatial index: [mdpridxtxfergm]
ORA-29400: data cartridge error
ORA-01422: exact fetch returns more than number of lines
ORA-06512: at "ST_MKARA. VRAT_GEOMETRII', line 12
ORA-06512: at the 'MDSYS. SDO_INDEX_METHOD_10I', line 10
29855 00000 - "an error occurred in the execution of routine ODCIINDEXCREATE.
* Cause: Cannot run the ODCIIndexCreate routine.
* Action: Check if the routine was coded correctly.
Thanks for help
Kirin
This looks like a problem in your function.
Make sure that you run this function successfully for each obj_id.
Looks for some obj_id SQL inside your function is a failure (returns more than one line).
Siva
Tags: Database
Similar Questions
-
problems of creating spatial indexes
Hello
I downloaded Oracle 10.2 Express edition and installed locally, (they don't want me to play with the regular database here until I learned a little bit about it :), and I'm trying to learn how spatial data in Oracle Locator on the work by working, for example, they have to http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14255/sdo_objrelschema.htm#i1004750
I created a gisuser with DBA DBA privilege to the SQL command line. GISuser strives through the database homepage.
Everything seems OK until I try to create indexes
CREATE INDEX cola_spatial_idx
ON cola_markets (shape)
INDEXTYPE IS MDSYS. SPATIAL_INDEX;
Gives errors:
ORA-29855: an error has occurred in the execution of routine ODCIINDEXCREATE
ORA-13203: cannot read the notice USER_SDO_GEOM_METADATA
ORA-13203: cannot read the notice USER_SDO_GEOM_METADATA
When I try to check the metadata:
Select * from user_sdo_geom_metadata;
gives:
ORA-00932: inconsistent data types: expected NUMBER obtained MDSYS. SDO_DIM_ARRAY
Same answer for:
Select * from mdsys.sdo_geom_metadata_table;
When I write the same query to command line, I get:
SQL > select * from mdsys.sdo_geom_metadata_table;
SDO_OWNER SDO_TABLE_NAME
-------------------------------- --------------------------------
SDO_COLUMN_NAME
--------------------------------------------------------------------------------
SDO_DIMINFO (SDO_LB, SDO_UB, SDO_DIMNAME, SDO_TOLERANCE)
--------------------------------------------------------------------------------
SDO_SRID
----------
ANONYMOUS COLA_MARKETS
FORM
SDO_DIM_ARRAY (SDO_DIM_ELEMENT ('X', 0, 20, 005), SDO_DIM_ELEMENT ('Y', 0, 20, 00)
(5))
SDO_OWNER SDO_TABLE_NAME
-------------------------------- --------------------------------
SDO_COLUMN_NAME
--------------------------------------------------------------------------------
SDO_DIMINFO (SDO_LB, SDO_UB, SDO_DIMNAME, SDO_TOLERANCE)
--------------------------------------------------------------------------------
SDO_SRID
----------
which seems to me that the metadata is as it should be?
I will be grateful for any ideas on what to do to solve the problem.
-partially solved:
I dropped the index and recreated on the PLSQL command-line. Got error messages:
ERROR on line 1:
ORA-29855: an error has occurred in the execution of routine ODCIINDEXCREATE
ORA-13203: cannot read the notice USER_SDO_GEOM_METADATA
ORA-13203: cannot read the notice USER_SDO_GEOM_METADATA
ORA-06512: at the 'MDSYS. SDO_INDEX_METHOD_10I', line 10
But even you I got these error messages, it strives to make some queries to command line, but not yet to the homepage.
SQL > SELECT SDO_GEOM. SDO_INTERSECTION (c_a.shape, c_c.shape, 0.005)
2 OF cola_markets are, cola_markets ikram
3 WHERE c_a.name = 'cola_a' AND c_c.name = 'cola_c ';
SDO_GEOM. SDO_INTERSECTION (C_A.SHAPE, C_C.SHAPE, 0.005) (SDO_GTYPE, SDO_SRID, SDO_PO
--------------------------------------------------------------------------------
SDO_GEOMETRY (2003, NULL, NULL, SDO_ELEM_INFO_ARRAY (1, 1003, 1), SDO_ORDINATE_ARR)
AY (4, 5, 3, 3, 5, 3, 5, 5, 4, 5))
DB home page, I always get:
ORA-00932: inconsistent data types: expected NUMBER obtained MDSYS. SDO_GEOMETRY
This means can't work with spatial data in the DB home page?
Why do I get these errors when I created the index, when it seems to work anyway?
The last request in example gives errors:
SQL > CREATE TABLE val_results (ROWID, VARCHAR2 result sdo_rowid (2000));
Table created.
SQL > SDO_GEOM APPEAL. VALIDATE_LAYER_WITH_CONTEXT ('COLA_MARKETS', 'FORM',
2 "VAL_RESULTS", 2);
DIAL THE SDO_GEOM. VALIDATE_LAYER_WITH_CONTEXT ('COLA_MARKETS', 'FORM',
*
ERROR on line 1:
ORA-13203: cannot read the notice USER_SDO_GEOM_METADATA
ORA-13203: cannot read the notice USER_SDO_GEOM_METADATA
ORA-06512: at the 'MDSYS. SDO_3GL', line 665
ORA-06512: at the 'MDSYS. SDO_GEOM", line 3770
ORA-06512: at line 1
SQL > SELECT * from val_results;
no selected line
When I check for data
SQL > select * from user_sdo_geom_metadata;
no selected line
but
Select * from mdsys.sdo_geom_metadata_table
given that he has given, it is not available in the view. What can I do about it?
Eija
Edited by: user12093437 23-Oct-2009 00:55
Published by: user12093437 on 23-Oct-2009 01:15
Published by: user12093437 on 23-Oct-2009 01:31The SDO_GEOMETRY and other types of objects are not supported in tools, use the command line
sqlplus to create.
Similarly, you will not be able to select objects using the tool that you use, so you must use the command line to select them as well.If you look at your metadata entry, he was ANONYMOUS for the SDO_OWNER that is the problem.
So delete this entry and recreate metadata from the command line.Siva
-
Cannot create spatial indexes in Oracle 11 g
Hi all!
I'm using Oracle 11 g 2 on Windows 2008 (64bitxR2). When I get errors when I create Spatial Index oracle11g2, but it works well with Oracle 10 g. I don't know what I did wrong, or do I need a fix for Oracle Spatial 11 g 2?
Can you help me? Thanks for any help!
ORA-29858: an error has occurred in the execution of the routine ODCIINDEXALTER
ORA-29400: data cartridge error
ORA-01403: no data found
ORA-13249: internal error in the Spatial index: [mdidxrbd]
ORA-13249: error in the Spatial index: index build failed
ORA-13249: error in the spatial index: [mdrcrtxfergm]
ORA-13249: error in the spatial index: [mdpridxtxfergm]
ORA-13200: internal error [ROWID:AAAUmYAAIAAAJuFAAB] in space indexering.
ORA-13206: [] internal error creating the spatial index
ORA-13033: invalid data in the SDO_ELEM_INFO_ARRAY in the SDO_GEOMETRY object
ORA-06512: vid 'MDSYS. SDO_INDEX_METHOD_10I', line 313
DELETE FROM mdsys.sdo_coord_ref_system WHERE srid = 50632625;
DELETE FROM mdsys.sdo_coord_op_param_vals WHERE coord_op_id = 50632625;
DELETE FROM mdsys.sdo_coord_ops WHERE coord_op_id = 50632625;
-COORD_OP_METHOD_ID = 9807: Transverse Mercator
INSERT MDSYS. () SDO_COORD_OPS
COORD_OP_ID, COORD_OP_NAME, COORD_OP_TYPE, COORD_OP_METHOD_ID.
INFORMATION_SOURCE, DATA_SOURCE,
SHOW_OPERATION, IS_LEGACY, IS_IMPLEMENTED_REVERSE, IS_IMPLEMENTED_FORWARD, REVERSE_OP)
values)
50632625, ' ST_74_0_GON_65: op-1 ', 'CONVERSION', 9807,.
"Digpro AB, [email protected],"Digpro AB. "
1, 'FALSE', 1, 1, 1);
-Setting for the latitude of origin (0)
INSERT MDSYS. () SDO_COORD_OP_PARAM_VALS
COORD_OP_ID, COORD_OP_METHOD_ID, PARAMETER_ID, PARAMETER_VALUE, PARAM_VALUE_FILE_REF, UOM_ID)
VALUES (50632625, 9807, 8801 0.000000, 9102, NULL);
-Setting for east central meridian 18 ° 03' 28,044 "
INSERT MDSYS. () SDO_COORD_OP_PARAM_VALS
COORD_OP_ID, COORD_OP_METHOD_ID, PARAMETER_ID, PARAMETER_VALUE, PARAM_VALUE_FILE_REF, UOM_ID)
VALUES (50632625, 9807, 8802, 18.05779, NULL, 9102);
-Setting for the scale factor
INSERT MDSYS. () SDO_COORD_OP_PARAM_VALS
COORD_OP_ID, COORD_OP_METHOD_ID, PARAMETER_ID, PARAMETER_VALUE, PARAM_VALUE_FILE_REF, UOM_ID)
VALUES (50632625, 9807, 8805, 0.99999425, NULL, 9201);
-Setting for abscissa
INSERT MDSYS. () SDO_COORD_OP_PARAM_VALS
COORD_OP_ID, COORD_OP_METHOD_ID, PARAMETER_ID, PARAMETER_VALUE, PARAM_VALUE_FILE_REF, UOM_ID)
VALUES (50632625, 9807, 8806, 100178.1808, NULL, 9001);
-Setting for fictitious ordinate
INSERT MDSYS. () SDO_COORD_OP_PARAM_VALS
COORD_OP_ID, COORD_OP_METHOD_ID, PARAMETER_ID, PARAMETER_VALUE, PARAM_VALUE_FILE_REF, UOM_ID)
VALUES (50632625, 9807, 8807,-6500614.7836, NULL, 9001);
-Adds the system projected on top the geodetic system in rt90_dp_geosystem_102.sql
-COORD_SYS_ID = 4400: CS Cartesian Axes. 2D: abscissa, ordinate (E, N). Directions: East, North. Unit of measure: m.
-GEOG_CRS_DATUM_ID = 4619: SWEREF99
INSERT MDSYS. () SDO_COORD_REF_SYSTEM
SRID, COORD_REF_SYS_NAME, COORD_REF_SYS_KIND, COORD_SYS_ID.
DATUM_ID, GEOG_CRS_DATUM_ID, SOURCE_GEOG_SRID, PROJECTION_CONV_ID.
CMPD_HORIZ_SRID, CMPD_VERT_SRID, INFORMATION_SOURCE,
DATA_SOURCE, IS_LEGACY, LEGACY_CODE, LEGACY_WKTEXT, LEGACY_CS_BOUNDS,
IS_VALID, SUPPORTS_SDO_GEOMETRY)
VALUES)
50632625,'ST_74_0_GON_65:-1 ', 'PROJECTION', 4400,.
NULL, 6619, 4619, 50632625,.
NULL, NULL, 'Digpro AB, [email protected],
'Digpro AB', 'FALSE', NULL, NULL, NULL,
"TRUE", "TRUE");
sqlplus kranskom/password
-Update the metadata for the KRANSKOM schema
Insert values (user_sdo_geom_metadata)
"BOUCHIHAB", "SHAPE", HE SAID.
() mdsys.sdo_dim_array
MDSYS.sdo_dim_element ('Y',-100000, 200000, 0.0005).
MDSYS.sdo_dim_element ('X',-100000, 200000, 0.0005),
MDSYS.sdo_dim_element ('Z', -1000, 1000, 0.0005)
), 50632625
);
-Display content in column form (in the table GRAG)
Insert into GRAG (SHAPE) values (MDSYS. SDO_GEOMETRY (3003,50632625, 'null', MDSYS. SDO_ELEM_INFO_ARRAY (1,5,1,1,2,1), MDSYS. SDO_ORDINATE_ARRAY(276.2339,-179.7433,0,276.2498,-179.7361,0,276.2668,-179.7324,0,276.2842,-179.7325,0,276.6235,-179.7691,0,276.793,-179.7731,0,276.8055,-179.772,0,276.8174,-179.7682,0,276.8281,-179.7619,0,277.073,-179.5793,0,277.2068,-179.4543,0,277.2122,-179.4481,0,277.2162,-179.4408,0,277.2186,-179.4329,0,277.2192,-179.4247,0,277.2159,-179.3107,0,277.3184,-178.9335,0,277.3252,-178.6913,0,277.3265,-178.5765,0,277.3258,-178.5683,0,277.3237,-178.5604,0,277.3201,-178.5531,0,277.3152,-178.5465,0,277.3092,-178.541,0,277.3023,-178.5366,0,277.2947,-178.5337,0,277.2867,-178.5321,0,277.1778,-178.5219,0,277.1731,-178.5219,0,277.1683,-178.5227,0,277.1637,-178.5244,0,277.1595,-178.5268,0,277.1558,-178.5299,0,277.1527,-178.5336,0,277.1503,-178.5378,0,277.1486,-178.5424,0,277.1478,-178.5471,0,277.1478 ,-178.5519,0,277.1536,-178.6151,0,277.1537,-178.6198,0,277.1529,-178.6244,0,277.1515,-178.6289,0,277.0012,-178.9885,0,276.9919,-179.0066,0,276.9797,-179.023,0,276.9651,-179.0373,0,276.2832,-179.6059,0,276.2804,-179.6079,0,276.2773,-179.6093,0,276.274,-179.6101,0,276.2706,-179.6103,0,276.2673,-179.61,0,276.264,-179.609,0,276.2609,-179.6075,0,276.2582,-179.6054,0,276.2559,-179.6029,0,276.2541,-179.6001,0,276.2528,-179.5969,0,276.252,-179.5935,0,276.2476,-179.5581,0,276.247,-179.5555,0,276.2459,-179.5529,0,276.2444,-179.5506,0,276.2425,-179.5485,0,276.2402,-179.5469,0,276.2377,-179.5456,0,276.235,-179.5449,0,276.2322,-179.5446,0,276.2294,-179.5449,0,276.2267,-179.5456,0,276.2242,-179.5468,0,276.2219,-179.5485,0,276.22,-179.5505,0,276.0132,-179.8127,0,276.0105,-179.8169,0,276.0086,- 179.8215,0,276.0076,-179.8263,0,276.0074,-179.8312,0,276.0082,-179.8361,0,276.0099,-179.8408,0,276.0124,-179.845,0,276.0157,-179.8488,0,276.0196,-179.8518,0,276.0239,-179.8541,0,276.0287,-179.8556,0,276.0336,-179.8562,0,276.0385,-179.8558,0,276.0433,-179.8546,0,276.0478,-179.8525,0,276.2339,-179.7433,0)));If the 2D, the value of 2002 data. otherwise assign 3002.
Siva
-
How to create Spatial indexes in SQL Developer Data Modeler 4
Hello
What is the procedure to create a Spatial index in SDDM v4? I found myself at an impasse because of the following problems:
(1) retro-engineering rate the spatial index, then I need to add them manually.
(2) adding an index does not allow me to check the 'spatial', and does not allow me to add the sdo_geometry column in the index definition.
(3) for the registration of the spatial properties for a table, I can not choose the name of the Spatial Index.
I came across an old post (Data Modeler - cannot create a spatial index), but this post is no longer valid because SDDM V4 does not allow me to create an index without columns (definition of the incomplete index).
Help is appreciated,
Kind regards
Richard.
Hi Richard,
Thanks for your update. I'm scared, I was assuming you were using the stand alone rather than SQL Developer Data Modeler.
I tried using SQL Developer 4.1.0.18.37 (ai2) using a thin connection and got the ClassCastException you have found.
But when I used ai2 autonomous, maker of data using the same login details 'Advanced', it worked OK and imported from the spatial index.
(I'm puzzled as to why these two seem to behave differently, as this is the version ai2 data integrated with SQL Developer ai2 maker).
I then plugged and reverse engineering the same tables (yet) in a new model.
Funny is that there is no error in the external journal this time, but the spatial properties are still not retroconcues correctly.
Is it possible that you have not set the option to import the spatial properties? I expect that the spatial properties would be imported or that the error should be registered.
SQL Developer ai2 imported properly the spatial properties and the spatial index, when I used a basic connection and specified host, port, and SID or Service name.
Another issue: SQL Developer relies on a certain JDK / JDBC library?
Any Java JDK 1.8 should be good.
David
-
ORA-29855 problem with creating an index
Hi all,
I am trying to create an index, but I have this problem:
SQL > CREATE INDEX ITALIA_NODE_IDX ON ITALIA_NODE$ (GEOMETRY) INDEXTYPE IS MDSYS. SPATIAL_INDEX;
CREATE INDEX ITALIA_NODE_IDX ON ITALIA_NODE$ (GEOMETRY) INDEXTYPE IS MDSYS. SPATIAL_INDEX
*
ERROR on line 1:
ORA-29855: an error has occurred in the execution of routine ODCIINDEXCREATE
ORA-13249: internal error in the Spatial index: [mdidxrbd]
ORA-13249: error in the Spatial index: index build failed
ORA-13249: error in the spatial index: [mdrcrtxfergm]
ORA-13249: error in the spatial index: [mdpridxtxfergm]
ORA-29400: data cartridge error
ORA-01653: unable to extend table M2_10A70$ $.1024 by SPACE in tablespace USERS
ORA-06512: a 'MDSYS. SDO_INDEX_METHOD_10I', line 10
What do you think of this problem?
Thank you in advance.
Crystal
Published by: crystal13 on June-18-2010 2.03Hello
It looks like your USERS tablespace is small. You have no space left. Expand the size of the storage space by enlarging the file below or put a second to her, or put the tablespace mode AUTOEXTEND. See the guide administrators: http://download.oracle.com/docs/cd/B19306_01/server.102/b14231/tspaces.htm#i1010516
-
run immideate Create spatial index
I can't create a spatial index in the package when using
run immideate
declare
l_res varchar2 (500);
Start
l_res: = ' CREATE INDEXES INDXSDO1_elements
(GEOMETRY)
INDEXTYPE IS MDSYS. SPATIAL_INDEX';
immediately run l_res;
end;
I get an exception:
ORA-29855: an error has occurred in the execution of routine ODCIINDEXCREATE
ORA-13249: internal error in the Spatial index: [mdidxrbd]
ORA-13249: error in the Spatial index: index build failed
ORA-13249: error in R-tree: [mdrcrtscrt]
ORA-13231: unable to create the index table [$MDRT_FC41] creating R-tree
ORA-13249: Stmt-run failure: CREATE TABLE 'GMT_TECH '. MDRT_FC41$ (NUMBER, NUMBER OF NODE_LEVEL, BLOB INFO NODE_ID) LOB (INFO) STORE (CACHE) AS NOLOGGING PCTFREE 2
ORA-29400: data cartridge error
ORA-01031: insufficient privileges
ORA-06512: at the 'MDSYS. SDO_INDEX_METHOD_10I', line 10
ORA-06512: at "GMT_TECH. REBUILDINDEX", line 66
ORA-06512: at line 3 level
Why does this happen?
I can create indexes without immediate execution
CREATE the INDEX INDXSDO1_elements
(GEOMETRY)
INDEXTYPE IS MDSYS. SPATIAL_INDEX
Thank you!Have you granted 'create table' and "create sequence" for the user? To do this explicitly rather than by a role.
-
Data Modeler - cannot create a spatial index
Good day, colleagues!
I have a version 584 of the Modeler of Dala.
Here is her quote Guide of Modeler of Oracle SQL Developer data:
"Properties of spatial definition 3.82.
...
Benchmark ID: Value Oracle Spatial SRID. ...
+ Create Spatial Index: Determines if a spatial index is created. +
Name of the spatial Index: name of the spatial index.
..."
I have a SDO_GEOMETRY column in my table and want to create the spatial index.
The problem is that there is no option "Create Spatial Index" in my space definition properties window. There is only 'The Spatial Index name' option. When I am creating the spatial index manually, I can't, because the option 'Space' for index creation is not active. I checked the table option 'Save as space Table', but it also did not help.
So, I have no way to create a spatial index. How can I do?Hello usamytch,
create spatial index is confusing. We will improve it in future releases. Here are the steps:
(1) creation of index - no need to add columns
(2) create the spatial column definition ('space properties' in the dialog table)
(3) in the definition of the spatial column, you can select the size of the spatial column, coordinate ID system, and you can select one of the existing indexes to be used as a space.
(4) after this index appear as space and you can define the spatial properties in the index dialog box
(5) you must check 'Save as space Table' in order to get meta-space data generated by DDLThere are additional space properties, that you can set in the physical model.
Philippe
-
Problem with CREATE INDEX script
Hello world!
I want to create a 3D Spatial Index. So I added a few lines (PARAMETERS ('sdo_indx_dims = 3')) in the following script, I get the error
PLS-00103: encountered the symbol "SETTINGS" then wait for the following :), * & = - + <>.
PLS-00103: encountered the symbol "SDO_INDX_DIMS" then wait for the following :), * & = - + <>.
Everything works well, if I remove the PARAMETERS ('sdo_index_dims = 3').
I know that I need a few symbols, but I'm not good in programming
Thanks for the tips!
-create spatial indexes
--
procedure create_index
newIndex user_indexes.index_name%type;
Start
list_spatial_indexed_tables;
-Find all tables containing columns and a corresponding line in user_sdo_geom_metadata
- and without a spatial index
for rec in spatial_index_cursor
loop
newIndex: = rec.table_name | '_RTREE_IDX ';
Execute ('create index' | newIndex |) "on" |
Rec.table_name | ' (' | rec.column_name |)
indextype') is mdsys.spatial_index ('sdo_indx_dims = 3') SETTINGS ');
end loop;
list_tables_missing_sdo_data ("spatial index cannot be created");
end create_index;Hello
in a string, you must make to a single quote, two quotes, then do this:
-- create spatial indexes -- procedure create_index is newIndex user_indexes.index_name%type; begin list_spatial_indexed_tables; -- Find all tables containing spatial columns and a corresponding row in user_sdo_geom_metadata -- and without a spatial index for rec in spatial_index_cursor loop newIndex := rec.table_name || '_RTREE_IDX'; run ('create index ' || newIndex || ' on ' || rec.table_name || '(' || rec.column_name || ') indextype is mdsys.spatial_index PARAMETERS (''sdo_indx_dims=3'')'); end loop; list_tables_missing_sdo_data ('spatial index can not be created'); end create_index;
If the quotes to the parameters clause must be doubled.
Herald tiomela
Superconsult.nl -
I'm a bit confused about what are the rules for creating spatial indexes to 11g.
Reading and testing I've done, it seems that the dimensionality of the data relative to the index does nothing, except in the case of the geodetic data, where all indexes must be 2D. When you query the data if the geometry2 parameter must be the same dimensionality as the index. Then.
SDO_FILTER (< xy, xyz, or xyzm data >, < dims the geometry must be the same and the index >)
Does make sense? Is this correct? Are there cases that this is not true for?
Thank you
TravisTravis,
You're right about the geodetic data where a 2D index should be created.
For non-geodetic data:
If 3D data and you expect to ask who with the geometry of the 3D window, so it is best to create a 3D index
that you would get better selectivity with a 3D index.However, if data is 3D, but the query window can be 2D or 3D, then it is better to create a 2D (at least in 11.1.0.6) index.
In 11.1.0.7 with a patch, this situation is resolved so that you can spend in a 2D window geometry, even when the index is in 3D.Then you must decide on the dimensionality of the index based on the dimensions of the most commonly used of the geometries of query.
If you have a 3D clue, but most of the time, you query the data with a 2D geometry so you get no benefit with the 3D index.But 3D index and query 3D geometry will give you the best performance the 3D and 2D index query geometry.
Siva
-
Error creating the Spatial Index for SRID 8307 on newly hardened database
Oracle 11g Rel2, Windows 2003 platform
Help, please...
Meeting with error message:
ERROR on line 1:
ORA-29855: an error has occurred in the execution of routine ODCIINDEXCREATE
ORA-13249: internal error in the Spatial index: [mdidxrbd]
ORA-13249: geodetic initialization error turn
ORA-13249: SRID 8307 does not exist in the table MDSYS.CS_SRS
ORA-29400: data cartridge error
ORA-04063: package body 'MDSYS. SDO_CS"contains errors
ORA-06512: at the 'MDSYS. SDO_INDEX_METHOD_10I', line 10
After running the command
INSERT INTO USER_SDO_GEOM_METADATA VALUES
("PointGeometry",
"pointGeom,"
MDSYS.sdo_dim_array (mdsys.sdo_dim_element ('Longitude',-180, 180, 1),
mdsys.sdo_dim_element('Latitude',-90,90,1)),
8307
);
CREATE the INDEX IDX_POINTGEOMETRY on PointGeometry (pointGeom) indextype is mdsys.spatial_index parameters('LAYER_GTYPE=POINT');
When I ask mdsys.sdo_cs I see that there are actually SRID 8307. This index was created in this schema without problem. The problem only arises once the hardened customer database and we tried to recreate the schema (and index).
Probably not coincidentally, I also get error:
ORA-29855: an error has occurred in the execution of routine ODCIINDEXCREATE
ORA-04063: package body "CTXSYS. DRIXMD' has errors
ORA-06508: PL/SQL: called program unit is not found: 'CTXSYS. DRIXMD ".
ORA-06512: at "CTXSYS. DRUE", line 145
ORA-06512: at "CTXSYS. TEXTINDEXMETHODS', line 366
ORA-04063: package body "CTXSYS. DRIXMD' has errors
ORA-06508: PL/SQL: called program unit is not found: 'CTXSYS. DRIXMD ".
When attempting to create and index Oracle Text context.
Your help is greatly appreciated.Then, that's the problem.
MDSYS user now has not run, and select privileges on the dbms_lob package.
You must grant privileges on this package in MDSYS.
Note that you can run into other issues of privilege package like this, so you must correct all by the granting of the
required privileges for MDSYS.Siva
-
I got an error while im trying to create a Spatial index on a table, ORA-29855 ODCIINDEXCREATE, error ORA-1324 in Index space: index build failed; ORA-06512 in MDSYS. SDO_INDEX_METHOD_10I: Cause cannot run the ODCIIndexCreate routine. Action: Check if the routine was coded correctly.
I insert in the MDSYS. SDO_GEOM_METADATA_TABLE these data:
INSERT INTO 'MDSYS. "" SDO_GEOM_METADATA_TABLE "(SDO_OWNER, SDO_TABLE_NAME, SDO_COLUMN_NAME, SDO_DIMINFO, SDO_SRID) VALUES ('MIGRA',"ESPACIAL","GEOM", SDO_DIM_ARRAY(MDSYS.) SDO_DIM_ELEMENT ('X', 200000, 1000000, 5-8), MDSYS. SDO_DIM_ELEMENT('Y',700000,1200000,5E-8), MDSYS. (SDO_DIM_ELEMENT('Z',0,0,5E-8)), 26717);
Validate with GeoRapto geometries in the "SPACE" table, I got some of them have problems, so I erase all records from the table and try to create the index again and has the same result "impossible to perform with success the routine ODCIIndexCreate.". I didn't add any other information related to this table. If you have an idea of what could be the problem, you can give me a hint on what do I do to fix this? Thanks in advance.
Published by: user11136667 on 07/31/2009 07:38The SRID you use is based on the EPSG model which we left supporting 10.2.0.3.
You cannot use it in 10.1.2 release.Siva
-
Spatial index error while creating an index for a column GeoRaster
Hi all
Several months ago, I inserted 12 map PNG Raster files in Oracle as GeoRaster data. I then looked into MapBuilder to verify that they have been charged, and as they appear, it seems to suggest that they were.
Today, however, I realized that I had not created an entry for USER_SDO_GEOM_METADATA or a spatial index. That's why I tried to do it by using the code below. When I made an entry in USER_SDO_GEOM_METADATA, I didn't add .spatialextent after the column name, web_raster_map. But while reading the manual MapViewer I decided that it was necessary to create a new entry. However, the error message displayed at the end, was the same in each case. If anyone has any ideas on what I can hurt, I would be grateful.
Is the entries abscissa-x and the ordered is wrong? Should this be X and Y, and if that resolves the errors? I've been using a script I created previously to vector data and adapting.
Error message was:INSERT INTO USER_SDO_GEOM_METADATA (TABLE_NAME, COLUMN_NAME, DIMINFO, SRID) VALUES ( 'WEB_RASTER_MAP_FILE', 'web_raster_map.spatialextent', SDO_DIM_ARRAY( -- full grid size goes here SDO_DIM_ELEMENT('eastings-x', -3273.58473839662, -8471.66, 0.005), SDO_DIM_ELEMENT('northings-y', -9694.76, -1632.88473839662, 0.005)), 96163497); -- this is a user created srid commit; CREATE INDEX WEB_RASTER_MAP_FILE_IDX ON WEB_RASTER_MAP_FILE (web_raster_map) INDEXTYPE IS MDSYS.SPATIAL_INDEX; commit;
Kind regardsError starting at line 14 in command: CREATE INDEX WEB_RASTER_MAP_FILE_IDX ON WEB_RASTER_MAP_FILE (web_raster_map) INDEXTYPE IS MDSYS.SPATIAL_INDEX Error at Command Line:14 Column:13 Error report: SQL Error: ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine ORA-13200: internal error [Unsupported Type] in spatial indexing. ORA-06512: at "MDSYS.SDO_INDEX_METHOD_10I", line 10 29855. 00000 - "error occurred in the execution of ODCIINDEXCREATE routine" *Cause: Failed to successfully execute the ODCIIndexCreate routine. *Action: Check to see if the routine has been coded correctly. commit succeeded.
Tim
Published by: user467357 on March 23, 2009 17:45
To add an additional comment.Tim,
You must create the index on web_raster_map.spatialextent.
The create index must therefore:CREATE the INDEX WEB_RASTER_MAP_FILE_IDX ON WEB_RASTER_MAP_FILE (web_raster_map.spatial_extent)
INDEXTYPE IS MDSYS. SPATIAL_INDEX; -
Cannot create the spatial index
It's a little bit of the puzzle for me this one, I made this little time on different system and I do not understand why it's here
Oracle 11.1.0.7 Windows 64-bit
We have simple following table:
CREATE TABLE DASHBOARD. DSGEOEXCEPTION
(
GEOIDE NUMBER NOT NULL,
ZORDER INTEGER DEFAULT 0 NOT NULL.
HOUSENO VARCHAR2 (100),
STREET VARCHAR2 (100),
VARCHAR2 (100) SUBURBAN,.
CITY VARCHAR2 (100),
COUNTY OF VARCHAR2 (100),
DESCRIPTION VARCHAR2 (200),
MDSYS FORM. SDO_GEOMETRY
)
LOGGING
NOCOMPRESS
NOCACHE
NOPARALLEL
NOMONITORING;
ALTER TABLE DASH. (ADD) DSGEOEXCEPTION
CONSTRAINT DSGEOEXCEPTION_PK
KEY ELEMENTARY SCHOOL
(GEOIDE)) ;
Insert values (user_sdo_geom_metadata)
"DASHBOARD. DSGEOEXCEPTION',.
"FORM."
MDSYS. () SDO_DIM_ARRAY
MDSYS. SDO_DIM_ELEMENT ('LONGITUDE',-180, 180, 0.00005),
MDSYS. SDO_DIM_ELEMENT ('LATITUDE',-90, 90, 0.00005)
),
8307);
until then, everything is good.
I run the two sql suite to ensure that everything is fine
Select * from USER_SDO_GEOM_METADATA;
Dashboard. DSGEOEXCEPTION, shape, ((LONGITUDE,-180, 180, 5E-5), (LATITUDE, -90, 90, 5th-5),), 8307
select * from mdsys.sdo_geom_metadata_table
DASHBOARD, dashboard. DSGEOEXCEPTION, shape, ((LONGITUDE,-180, 180, 5E-5), (LATITUDE, -90, 90, 5th-5),), 8307
select * from ALL_SDO_GEOM_METADATA;
first 2 return one row as planned last returns nothing
creating the index
CREATE INDEXES DASH. DSGEOEXCEPTION_SIDX ON DASHBOARD. DSGEOEXCEPTION
(FORM)
INDEXTYPE IS MDSYS. SPATIAL_INDEX
NOPARALLEL;
or
CREATE INDEXES DASH. DSGEOEXCEPTION_SIDX ON DASHBOARD. DSGEOEXCEPTION
(FORM)
INDEXTYPE IS MDSYS. SPATIAL_INDEX;
fails with the error:
ORA-29855: an error has occurred in the execution of routine ODCIINDEXCREATE
ORA-13203: cannot read the notice USER_SDO_GEOM_METADATA
ORA-13203: cannot read the notice USER_SDO_GEOM_METADATA
ORA-06512: at the 'MDSYS. SDO_INDEX_METHOD_10I', line 10
According to one of the posts, I run this
ALTER session set current_schema = MDSYS;
@$ORACLE_HOME/md/admin/prvtgmd.plb
but no difference I can always create index
Any suggestions?Please, try the following:
Insert values (user_sdo_geom_metadata)
"DSGEOEXCEPTION,"
"FORM."
MDSYS. () SDO_DIM_ARRAY
MDSYS. SDO_DIM_ELEMENT ('LONGITUDE',-180, 180, 0.00005),
MDSYS. SDO_DIM_ELEMENT ('LATITUDE',-90, 90, 0.00005)
),
8307); -
Oracle Spatial Index on a column NOT NULL
I'm using the Oracle 11 g with data space init.
I have a SDO_GEOM column in a table that has NULL values for some records. I have to run spatial query based on this column so the need of a spatial index on it. Is it possible to create a Spatial Index on a column SDO_GEOM even if some of them have the NULL value and results of spatial query?
Thank you
Alan
Published by: user3883362 on 29 April 2013 05:59Alan,
Is it possible to create a Spatial Index on a column SDO_GEOM even if some of them are NULL
Yes.
SQL> CREATE TABLE test (ID NUMBER PRIMARY KEY, geom MDSYS.SDO_GEOMETRY); Table created. -- "insert a row with non-NULL geometry" SQL> INSERT INTO test VALUES (1, SDO_GEOMETRY('POINT (6000000 2100000)', 40986)); 1 row created. -- "insert a row with NULL geometry" SQL> INSERT INTO test VALUES (2, NULL); 1 row created. SQL> CREATE INDEX test_spx ON test (geom) INDEXTYPE IS MDSYS.SPATIAL_INDEX; Index created.
.. .and getting results of spatial query
Yes, assuming that your data is valid.
-- "Creates a 10' buffer around the point we previsouly inserted then applies SDO_INSIDE" SQL> SELECT ID, SDO_INSIDE(geom, SDO_GEOM.SDO_BUFFER(geom, 10, 1)) FROM test; 1 TRUE --"our point geometry" 2 FALSE --"our NULL" 2 rows selected.
If you encounter problems here, I think you can use the functions that are choking in NULL values, for example, the conversion of NULL in WKT geometry.
How do you access data (sqlplus, application, custom, etc.)? What is the query, and we see a few examples of data?
Kind regards
Noel -
The details of the max/min for the spatial index
Hello
I am new to Oracle Spatial and perhaps this is a stupid question, but when I create an index for a table of geo, I always manually insert a line into the USER_SDO_GEOM_METADATA table. The DIMINFO table contains the bounding box, which are in my case X min/max / coordinated full geo (Lat/Long) of the table.
The SDO_GEOMETRY column in my table of geo contains some polygons. How can I automatically query the table of geo to return the desired max/min X / Y coordinates? I'm looking for something like maxX (geo_data) SELECT... OF geo_table. Is this possible?
Thank you!
Hello Hans,.
Well, I think that the old gods of Oracle Spatial of ages had intended a workflow by which metadata records were filled with knowledge not stored in the database or the spatial column. Thus, for example the tolerance whence? He comes to your head or your documentation that you hold outside the database, etc.. I mean that you put in this recording in order to enter the database. So I would say that generally metadata was never intended to be created from the data.
Now, we must know that the values stored in USER_SDO_GEOM_METADATA min/max are largely informative to my knowledge. You can insert values garbage if you love without worrying much Oracle Spatial. The only function I can think of who actually reads these values is the MD without papers. HHENCODE (everyone knows others?). But that being said its always a good idea to avoid the garbage and properly document your spatial layers.
So, in terms of generation of these values. I would say that your DIMINFO values should ideally include the size of your current data more any new data you could insert as part of your workflow. So I would not shake this until your min/max values accurate unless your data is very, very static. It could well be. Still, usually I if I had a layer of data to the United States mainland that the values that run in the South enough to cover all the Florida keys, etc. (with some tampons too). Even if I have no data for Florida keys in that exact moment. It's rather subjective, to deduce the data, it must come from your documentation and your needs.
But you probably still want something. Good then, voila.
SELECT a.bef || a.dim_xy || a.dim_3 || a.aft AS dim_info FROM ( SELECT 'MDSYS.SDO_DIM_ARRAY(' AS bef ,'MDSYS.SDO_DIM_ELEMENT(''X'',' || MDSYS.SDO_GEOM.SDO_MIN_MBR_ORDINATE(aa.shape,1) || ',' || MDSYS.SDO_GEOM.SDO_MAX_MBR_ORDINATE(aa.shape,1) || ',0.05)' || ',MDSYS.SDO_DIM_ELEMENT(''Y'',' || MDSYS.SDO_GEOM.SDO_MIN_MBR_ORDINATE(aa.shape,2) || ',' || MDSYS.SDO_GEOM.SDO_MAX_MBR_ORDINATE(aa.shape,2) || ',0.05)' AS dim_xy ,CASE WHEN aa.shape.get_dims() > 2 AND aa.shape.get_lrs_dim() = 0 THEN ',MDSYS.SDO_DIM_ELEMENT(''Z'',' || MDSYS.SDO_GEOM.SDO_MIN_MBR_ORDINATE(aa.shape,3) || ',' || MDSYS.SDO_GEOM.SDO_MAX_MBR_ORDINATE(aa.shape,3) || ',0.001)' ELSE NULL END AS dim_3 ,')' AS aft FROM ( SELECT MDSYS.SDO_AGGR_MBR(a.shape) AS shape FROM my_table a ) aa ) a;
Note again once the tolerances must be hard-coded.
And also it will not work for the LRS geometries.
I respect the old gods and not go this route.
See you soon,.
Paul
Maybe you are looking for
-
HP Laser Jet Printer Setup error
I want to conect H P Laset printer to Jet to a CD on my laptop and I get the message that the device is not available in the computer
-
I suddenly lost history and the operation of the bookmark.
I am no longer able-favorite sites, see my favorites on a bookmark list, see list of history - get the URL suggestions as I type Also, the Omnibar has divided into 2 separate areas
-
error code 646 while that convert videos using real player converter
How can I fix my computer? When I try to convert videos using the RealPlayer converter, it displays an error 646 code, what can I do?
-
Why the Messenger is not available in hotmail
I used Windows Live Hotmail for years and also use messenger until yesterday when he says "not available".I can use messenger if I run it on its own, but not from within Hotmail?
-
QWERTY keyboard full blackBerry Smartphones
My phone has changed since a full keyboard to more like a normal phone and I can't find the setting to restore. I pressed the button menu and then options, but it doesn't give me any keyboard options. How do change! Thank you.