Spatial Index problem again

I have a TAR open and I am awaiting an answer, but the representative is based in Austraila so I am assuming I will not get another answer until tomorrow, so hopefully someone can see what I have going on and can offer some advice (Thanks in advance Dan :-) )
Trying to create my spatial index:
create index locations_test_sidx on locations_test(map_loc_data) indextype is
mdsys.spatial_index
ERROR at line 1:
ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
ORA-13249: internal error in Spatial index: [mdidxrbd]
ORA-13249: Error in Spatial index: index build failed
ORA-13249: Error in spatial index: [mdrcrtxfergm]
ORA-13249: Error in spatial index: [mdpridxtxfergm]
ORA-13200: internal error [ROWID:AAAJMWAADAAAJsLAEp] in spatial indexing.
ORA-13206: internal error [] while creating the spatial index
ORA-13032: Invalid NULL SDO_GEOMETRY object
ORA-06512: at "MDSYS.SDO_INDEX_METHOD_9I", line 7
ORA-06512: at line 1
Our Data in the table looks like the following:
Yuma Proving Ground, AZ SDO_GEOMETRY(2001, 8307, SDO_POINT_TYPE(32.773,-114.5, NULL), NULL, NULL)
I do not understand why I am getting the ORA-13032 error. From all that I have on documentation my table is created correctly. Here is a script I used to create my Spatial Table, maybe somethng in there will give some pointers as to what is wrong.
Thank you!
declare
lv_loc_id locations.location_id%TYPE;
lv_lat locations.latitude%TYPE;
lv_long locations.longitude%TYPE;
CURSOR loc
IS
SELECT DISTINCT location_id
FROM locations_test
WHERE state IS NOT NULL;
BEGIN
OPEN loc;
LOOP
FETCH loc
INTO lv_loc_id;
EXIT WHEN loc%NOTFOUND;
SELECT latitude,
longitude
INTO
lv_lat,
lv_long
FROM locations_test
WHERE location_id = lv_loc_id;
UPDATE locations_test
SET map_loc_data = MDSYS.SDO_GEOMETRY(
2001,
8307,
MDSYS.SDO_POINT_TYPE(lv_lat,lv_long,NULL),
NULL,
NULL)
WHERE location_id = lv_loc_id;
END LOOP;
CLOSE loc;
END;

Here is the update:
Recreated the Index, YAY no errors!!!
Trying to generate my map though in Mapviewer gives the following:
05/03/30 12:06:42 java.sql.SQLException: ORA-29902: error in executing ODCIIndex Start() routine
ORA-13208: internal error while evaluating [window SRID does not match layer SRID] operator
ORA-06512: at "MDSYS.SDO_INDEX_METHOD_9I", line 259
Here is the code that I am generating my map with:
<?xml version="1.0" standalone="yes"?>
<map_request
title="Testing Dynamic Themes"
basemap="Demo_MAP"
datasource ="mvdemo"
width="640"
height="480"
bgcolor="#a6cae0"
antialiase="false"
format="PNG_STREAM">
<center size="45">
<geoFeature
render_style="M.cyan pin"
label="Center" label_always_on="true"
text_style="T.Title" radius="100000">
<geometricProperty>
<point>
<coordinates>-96.2, 39</coordinates>
</point>
</geometricProperty>
</geoFeature>
</center>
<themes>
<theme name="Locations">
<jdbc_query
datasource="mvdemo"
spatial_column="map_loc_data"
render_style="M.STAR"
label_column="CITY"
label_style="T.CITY NAME">
select map_loc_data
from resources.locations_test l
where l.country = 'US'
and l.region_ID = 1
and l.location_id IN (Select distinct d_loc_id from cii.devices)
</jdbc_query>
</theme>
</themes>
</map_request>
this does display a map with a center point, just none of the cities are labeled or displayed.
Here is my USER_SDO_GEOM_METADATA
TABLE_NAME
COLUMN_NAME
DIMINFO(SDO_DIMNAME, SDO_LB, SDO_UB, SDO_TOLERANCE)
SRID
LOCATIONS_TEST
MAP_LOC_DATA
SDO_DIM_ARRAY(SDO_DIM_ELEMENT('LONGITUDE', -180, 180, .5), SDO_DIM_ELEMENT('LATITUDE', -90, 90, .5))
8307
Here is an example of my data:
LOCATION_ID LOCATION ST LATITUDE LONGITUDE REGION_ID CO
MAP_LOC_DATA(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO, SDO_ORDINATES)
6264 NASHUA NH 42.7486 -71.491848 1 US
SDO_GEOMETRY(2001, 8307, SDO_POINT_TYPE(-71.491848, 42.7486, NULL), NULL, NULL)
My data looks like the following:

Similar Messages

  • Creating a spatial index problem

    Hi there
    I have to create a table in Oracle Spatial and use it with MapInfo MapX 4.51 OCX to insert some features in it.
    I read a thread in the MapX forum where I learnt that I had to create my table (CREATE TABLE statement), add a record in MAPINFO_MAPCATALOG table, and then add a line to the SDO_GEOM_METADATA_TABLE table. With this, I can add some features in the table by MapInfo, and I can use the INSERT clause in Oracle. Well. But when I try to use the table in MapX, I can't even load it nor insert a feature : I have an Oracle error saying "ORA-13226 interface not supported without a spatial index".
    When creating a spatial index in Oracle, I have got this message :
    ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
    ORA-13203: failed to read USER_SDO_GEOM_METADATA table
    ORA-13203: failed to read USER_SDO_GEOM_METADATA table
    ORA-06512: at "MDSYS.SDO_INDEX_METHOD_9I", line 7
    ORA-06512: at line 1
    The index is still created but marked at FAILED, so it is now impossible to insert features in it (even by INSERT clause).
    The newly created table is empty, and it was created on the basis of another existing table. The records added in SDO_GEOM and MAPINFO_MAPCATALOG were copies of the records concerning the source table.
    And I have finally granted SELECT and UPDATE on SDO_GEOM_METADATA_TABLE table and USER_SDO_GEOM_METADATA view to the user doing the operations.
    Any clue ? I am using MapX 4.51 and Oracle 9.2.0.1.0.
    Thank you for any idea. I am puzzled.

    Hi,
    There is something wrong with accessing metadata.
    To identify where the problem is:
    - run the create-index from sqlplus (and not from mapx)
    - check whether the user creating the index can
    see the metadata from user_sdo_geom_metadata. (This
    user also needs create-table, create-sequence privs).
    Let us know what happens.
    - Ravi.

  • Spatial Index Problem in View

    Hello everyone.
    I have a table (A) that stores point locations (X,Y) and contains the following fields:
    ID NUMBER(10,0) No 1
    CD_CODIGO_EMA VARCHAR2(10 BYTE) Yes 2
    TX_NOMBRE_EMA VARCHAR2(50 BYTE) Yes 3
    CD_PROVINCIA_EMA NUMBER(5,0) Yes 4
    CD_MUNICIPIO_EMA NUMBER(5,0) Yes 5
    NU_UTMX_EMA NUMBER(10,2) Yes 6
    NU_UTMY_EMA NUMBER(10,2) Yes 7
    NU_HUSO_EMA NUMBER(5,0) Yes 8
    NU_TIPO_EMA NUMBER(3,0) Yes 9
    TX_URL_EMA VARCHAR2(255 BYTE) Yes 10
    I have created a view (V) with a field of type SDO_GEOMETRY values based on longitude (NU_UTMX_EMA) and latitude columns (NU_UTMY_EMA) in Table A, as follows:
    CREATE VIEW A_VIEW (ID, SHAPE)
    AS SELECT
    ID, MDSYS.SDO_GEOMETRY(2001, 83030, MDSYS.SDO_POINT_TYPE(NU_UTMX_EMA, NU_UTMY_EMA, NULL), NULL, NULL)
    FROM A
    I have updated the view USER_SDO_GEOM_METADATA:
    insert into user_sdo_geom_metadata values (
    'A_VIEW',
    'SHAPE',
    MDSYS.SDO_DIM_ARRAY(
    MDSYS.SDO_DIM_ELEMENT('Longitude',90000,630000,0.005),
    MDSYS.SDO_DIM_ELEMENT('Latitude',3980000,4300000,0.005)
    83030
    I can see the spatial view in differentes clientes (for example, Geoserver and ArcMap). The problem is when I try to Zoom into the View I receive the message: Interface not supported without a spatial index+
    If I try to make an spatial index on the view, I receive the message:
    create index V_idx on A_VIEW(SHAPE) indextype is MDSYS.SPATIAL_INDEX;
    ORA-01702 A view is nos appropiate here.
    How can I fix it? The original table (A) has a spatial index and it works fine.
    Thanks in advance

    This should be answered in your other post:
    View with SDO_GEOMETRY column

  • Spatial Index problems - Newbie here

    Hello,
    I am pretty new to Oracle and have had an issue pop up. I was able to solve it but I am wondering what the issue really is so I can have a better understanding of how Oracle works.
    I am trying to run a spatial index on a table which contains partitions, here is the code I was running.
    CREATE INDEX "xxx_ADMIN"."CODED_PART_CODE_SIDX" ON "xxx_ADMIN"."CODED_PART_CODE" ("GEOMETRY")
    INDEXTYPE IS "MDSYS"."SPATIAL_INDEX" LOCAL (
    PARTITION "PART_v1234" PARAMETERS ('tablespace=xxx_coded_part_code sdo_rtr_pctfree=0 pctincrease=0 layer_gtype=POINT'),
    PARTITION "PART_v2345" PARAMETERS ('tablespace=xxx_coded_part_code sdo_rtr_pctfree=0 pctincrease=0 layer_gtype=POINT'),
    PARTITION "PART_v3456" PARAMETERS ('tablespace=xxx_coded_part_code sdo_rtr_pctfree=0 pctincrease=0 layer_gtype=POINT'),
    PARTITION "PART_OTHER" PARAMETERS ('tablespace=xxx_coded_part_code sdo_rtr_pctfree=0 pctincrease=0 layer_gtype=POINT')) ;
    commit;
    This never seems to work but when I change the name of the partitions to start with a 'd' instead of a 'v' (PART_v1234 becomes PART_d1234) everthng works just fine.
    Any idea why this happens?
    Any help would be appreciated,
    Tom

    Well the first thing you need to learn about Oracle is basic concepts such as when asking a question about Spatial to post in the forum that discusses Spatial.
    This group, Advanced Queuing is totally unrelated to Spatial.

  • Spatial Index problem with query

    I created a spatial index with user A. When i do a spatail query, i receive a good result. But, when i execute the same query with user B, i receive the following error :
    ERROR at line 1:
    ORA-13226: interface not supported without a spatial index
    ORA-06512: at "MDSYS.MD", line 1723
    ORA-06512: at "MDSYS.MDERR", line 8
    ORA-06512: at "MDSYS.SDO_3GL", line 58
    I don't understand why user B seems not to be able to see or use the spatal index created by user A.

    Hi,
    What version of spatial are you using? You might have to grant select access on the spatial index table to user b in older versions of spatial.

  • Extracting start/end vertex... no spatial index problem - please help!

    Hi All,
    I've got a table of lines and i'm trying to create a view of the start and end points of each line. I've managed to do this but i want to display it as a layer in my wms and i keep getting the no spatial index error.
    I've tried a couple of ways of doing this...
    1) using getvertices and extracting the start and end, then reconstructing an sdo_geometry in the view - can quite understand the no spatial index error here.
    2) using SDO_LRS.GEOM_SEGMENT_END_PT and SDO_LRS.GEOM_SEGMENT_START_PT - would of thought this would use the index on the base table?
    Any other methods or help would be most appreciated..
    Thanks

    You might be able to do this using a function-based index (with no view). Here is a quick example (using a table I have):
    DELETE FROM USER_SDO_GEOM_METADATA
    WHERE TABLE_NAME = 'NTC_MAP_ROAD_HIGHWAY_AGGR'
    AND COLUMN_NAME = 'MDSYS.SDO_LRS.GEOM_SEGMENT_START_PT(GEOMETRY)';
    INSERT INTO USER_SDO_GEOM_METADATA (TABLE_NAME, COLUMN_NAME, DIMINFO, SRID)
    VALUES ('NTC_MAP_ROAD_HIGHWAY_AGGR', 'MDSYS.SDO_LRS.GEOM_SEGMENT_START_PT(GEOMETRY)',
    SDO_DIM_ARRAY
    (SDO_DIM_ELEMENT('LONG', -180.0, 180.0, 0.5),
    SDO_DIM_ELEMENT('LAT', -90.0, 90.0, 0.5)
    8307);
    COMMIT;
    drop index NTC_MAP_ROAD_HWY_AGGR_FBSIDX;
    create index NTC_MAP_ROAD_HWY_AGGR_FBSIDX
    on NTC_MAP_ROAD_HIGHWAY_AGGR(MDSYS.SDO_LRS.GEOM_SEGMENT_START_PT(GEOMETRY))
    indextype is mdsys.spatial_index;
    select link_id, MDSYS.SDO_LRS.GEOM_SEGMENT_START_PT(GEOMETRY)
    from NTC_MAP_ROAD_HIGHWAY_AGGR
    where sdo_filter(MDSYS.SDO_LRS.GEOM_SEGMENT_START_PT(GEOMETRY),
    sdo_geometry(2003,8307,null,sdo_elem_info_array(1,1003,3),
    sdo_ordinate_array(-122.5,37.5,-122.3,37.7)))='TRUE';

  • Numeric character problems when creating spatial index

    Hi,
    We have run into a problem when trying to create spatial indexes. The problem seems to be that an mdsys-procedure tries to use a number with a comma as decimal symbol in an update statement
    Error message:
    ERROR at line 1:
    ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
    ORA-13249: internal error in Spatial index: [mdidxrbd]
    ORA-13249: Error in Spatial index: index build failed
    ORA-13249: Stmt-Execute Failure: begin mdsys.prvt_idx.execute_update(NULL,NULL,'set sdo_rtree_quality = 1,00000000 where UPPER(sdo_index_owner) = UPPER(''BK'') AND UPPER(sdo_index_name)=UPPER(''TEST_RTREE_IDX'') AND UPPER(sdo_index_table)=UPPER(''MDRT_8120$'')',NULL); end;
    ORA-29400: data cartridge error
    ORA-01747: invalid user.table.column, table.column, or column specification
    ORA-06512: at "MDSYS.PRVT_IDX", line 17
    ORA-06512: at line 1
    ORA-06512: at "MDSYS.SDO_INDEX_METHOD_9I", line 7
    ORA-06512: at line 1
    Our problem seems to be identical to the one discussed in this thread: create RTREE falied on 9.2.0.4
    Regional settings, language versions etc:
    Client:
    OS: Windows 2000
    Regional options (OS): Swedish, Sweden
    Sqlplus (console and windows versions): v 9.2.0.1.0
    Registry: NLS_LANG =SWEDISH_SWEDEN.WE8MSWIN1252
    Server:
    OS: Windows Server 2003
    Regional options (OS): Swedish, Sweden
    Oracle: v 9.2.0.3.0
    Registry: NLS_LANG =SWEDISH_SWEDEN.WE8MSWIN1252
    We have also tried building the indexes after overriding these settings by setting the environment variables NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1 on both the client- and the server computer. This gives exactly the same error. We have tried setting NLS_NUMERIC_CHARACTERS to '.,' instead of ',.', but this does not help either.
    We haven't tried changing the NLS_LANG registry entry on the server, because this is a production server at a customer's site that hosts several other databases, so we would prefer not to have to restart it if we can avoid it. However, as we understand it, the environment variable NLS_LANG should override the registry setting anyway, right?
    We first experienced the problem when trying to build indexes on imported data. To verify that the problem was not with the data, we wrote a simple test script that:
    1)Creates a table
    2)Creates metadata
    3)Inserts a simple geometry
    4)Tries to create an index
    The error message above is from running this script. We have verified that the script
    works ok on another database server.
    Below are the values of some of the language parameters right before running the script
    (we have tried many other settings with the same result).
    parameter...........................db................................instance...............session
    NLS_CHARACTERSET.......WE8MSWIN1252..................................................
    NLS_LANGUAGE...............AMERICAN...................AMERICAN...........AMERICAN
    NLS_NCHAR_CH...............AL16UTF16 ..........................................................
    NLS_NCHAR_CONV... ......FALSE..........................FALSE..................FALSE..
    NLS_NUMERIC_CH...---------.,---------------------------------------------------------------.,
    NLS_TERRITORY..............AMERICA......................AMERICA..............AMERICA
    The guy who started the thread referenced above solved the problem, but we haven't been able to get it working by changing registry entries and session parameters.
    The question is: Which setting will make the number in 'set sdo_rtree_quality = 1,00000000...' be generated with a . instead of a , as decimal symbol?

    Ok, so here is my plan to solve this:
    1) Change the default user locale (the language under "standards and formats") to English for the account under which the Oracle server runs.
    2) Reboot (or is there an easier way to make Oracle reload the settings?)
    This should make the index creation work. It may break something else however, so to avoid this I can set the user locale back to Swedish afterwards .
    You can subsequently change the setting and update the sdo_rtree_quality in
    the metadata and it should work fine. Do you mean I have to update the sdo_rtree_quality in some way to make it work after I have changed the default user locale back to Swedish? How do I do this?
    Thanks a million both of you!

  • Index problem in a spatial query

    I try to run following query in SQL Plus:
    SELECT A.objectid FROM TABBDG A, TABREG B
    WHERE A.objectid = 68 AND B.regionname = 'Hong2'
    AND SDO_RELATE(A.geoloc, B.geoloc, 'mask=INSIDE querytype = WINDOW') = 'TRUE';
    To find out weather or not objectid = 68 is inside of region (='Hong2"). I got following error messages:
    ERROR at line 1:
    ORA-13226: interface not supported without a spatial index
    ORA-06512: at "MDSYS.MD", line 1723
    ORA-06512: at "MDSYS.MDERR", line 8
    ORA-06512: at "MDSYS.SDO_3GL", line 57
    ORA-06512: at line 1
    But when I try to add an index to table TABREG, I got following error:
    ERROR at line 1:
    ORA-29879: cannot create multiple domain indexes on a column list using same indextype
    Seem to me that the index was already there. Can any one help me? Thanks.

    I found out the reason of problem. I used an old version of EasyLoader (4.5?). When I get the latest EasyLoader V6.5, there is no problem any more to run spatial query. You can get lates EasyLoader V6.5 from MapInfo or from me at: [email protected]
    Thanks for all help.

  • Spatial Index Creation Problem - 11g

    Dear all,
    I have a customer with a problem creating a spatial index in her database. The thing is, she is also storing rasters in the database in a different schema and those indices are created OK. Also in 2 other databases, mine & another consultant, the indices are created OK. The error is:
    Error starting at line 1 in command:
    CREATE INDEX rs_idxSPAT ON road_segments(RD_GEOMETRY)
    INDEXTYPE IS mdsys.spatial_index
    PARAMETERS ('SDO_INDX_DIMS=2 SDO_RTR_PCTFREE=20 geodetic = false layer_gtype=LINE')
    Error at Command Line:1 Column:13
    Error report:
    SQL Error: ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
    ORA-13205: internal error while parsing spatial parameters
    ORA-13249: Stmt-Execute Failure: SELECT DBMS_ASSERT.QUALIFIED_SQL_NAME( :1 ) FROM DUAL
    ORA-29400: data cartridge error
    ORA-44004: invalid qualified SQL name
    ORA-06512: at "SYS.DBMS_ASSERT", line 188
    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.
    The table road_segments is empty when the statement is executed.
    Any thoughts, anyone?
    Thanks very much,
    Jim Greetham

    Jim,
    We typically don't support these kind of schema names for Spatial schemas
    as they have to be created with double quotes.
    Like create user "3droads".
    In this case, the schema name is the problem. They should pick a schema name
    they can create without using the double quotes.
    siva

  • Problems creating an spatial index with srid=4326

    Hi!
    I would like to know if somebody can help me with the following problem: We are using the 10.2.0.1 version and we need that our SRID value is 4326. We do not have problems with 8307 or another value. However, when we tried to use srid = 4326, appears the following error message:
    Error on line 17 CREATE INDEX SIDX_D3M_SDO_GEOMETRY ON DAT_3DM_MODEL (DM3_SDO_GEOMETRY) INDEXTYPE ORA-29855: an error in the execution of routine ODCIINDEXCREATE has taken place ORA-13249: internal error in Spatial index: [mdidxrbd] ORA-13249: Error initializing geodetic transform ORA-06512: in “MDSYS.SDO_INDEX_METHOD_10I”, line 10
    The PL/SQL that we used is the following one:
    DELETE FROM USER_SDO_GEOM_METADATA WHERE TABLE_NAME = “DAT_3DM_MODEL”
    COMMIT
    INSERT INTO USER_SDO_GEOM_METADATA (TABLE_NAME, COLUMN_NAME, DIMINFO, SRID) VALUES('DAT_3DM_MODEL', 'DM3_SDO_GEOMETRY', MDSYS.SDO_DIM_ARRAY ( MDSYS.SDO_DIM_ELEMENT ('LONGITUDE', -180, 180, 0,05), -- MDSYS.SDO_DIM_ELEMENT ('LATITUDE', -90, 90, 0.05) ), 4326 )
    CREATE INDEX SIDX_D3M_SDO_GEOMETRY ON DAT_3DM_MODEL (DM3_SDO_GEOMETRY) INDEXTYPE IS MDSYS.SPATIAL_INDEX
    Thanks in advance,
    Susana.

    I cannot reproduce the error, in my environment. However:
    Your insert statement into USER_SDO_GEOM_METADATA appears to have included some typos. They might have happened, when transcribing. Please make sure you use the following:
    INSERT INTO USER_SDO_GEOM_METADATA (
    TABLE_NAME,
    COLUMN_NAME,
    DIMINFO,
    SRID)
    VALUES(
    'DAT_3DM_MODEL',
    'DM3_SDO_GEOMETRY',
    MDSYS.SDO_DIM_ARRAY (
    MDSYS.SDO_DIM_ELEMENT ('LONGITUDE', -180, 180, 10),
    MDSYS.SDO_DIM_ELEMENT ('LATITUDE', -90, 90, 10)),
    4326);
    However, the actual culprit is most certainly different. As I suspected, it might be related to the "decimal comma": In Germany, for instance, a decimal comma is used, instead of a decimal point. You have used a decimal comma in your original INSERT, as well (0,05 instead of 0.05).
    Please try the following:
    SQL> select wktext from cs_srs where srid = 4326;
    WKTEXT
    GEOGCS [ "WGS 84", DATUM ["World Geodetic System 1984 (EPSG ID 6326)", SPHEROID
    ["WGS 84 (EPSG ID 7030)", 6378137, 298.257223563]], PRIMEM [ "Greenwich", 0.0000
    00 ], UNIT ["Decimal Degree", 0.01745329251994328]]
    On your system, you will likely find a decimal comma, where my output has a decimal point. This is bug 5097326, which has been fixed, and backported to 10.2.0.3 and 10.2.0.4.

  • Problem on creating spatial index

    Hi,
    I am newbie in Oracle Spatial and looking for help on creating spatial index
    I am working on OpenStreetMap data. I intended to import the OSM data from PostGis to Oracle Spatial. This code is executed to import the data
    ogr2ogr -f OCI OCI:osm/password@pdborcl PG:"host=localhost user=postgres password=password dbname=gis port=5432" -lco OVERWRITE=yes -lco SRID=8307 -nln planet_osm_polygon planet_osm_polygon
    However, I got this error when importing the data.
    ERROR 1: ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
    ORA-13249: internal error in Spatial index: [mdidxrbd]
    ORA-13249: Error in Spatial index: index build failed
    ORA-13249: Error in spatial index: [mdrcrtxfergm]
    ORA-13249: Error in spatial index: [mdpridxtxfergm]
    ORA-13200: internal error [ROWID:AAAW/iAAQAAAIfsAAP] in spatial indexing.
    ORA-13206: internal error [] while creating the spatial index
    ORA-13033: Invalid data in the SDO_ELEM_INFO_ARRAY in SDO_GEOMETRY object
    ORA-06512: at "MDSYS.SDO_INDEX_METHOD_10I", line 10
    in CREATE INDEX "OSI_12283" ON PLANET_OSM_POLYGON("ORA_GEOMETRY") INDEXTYPE IS
    MDSYS.SPATIAL_INDEX
    This creating index failure only happen when I tried to import planet_osm_polygon table. I did not get this error when I imported the planet_osm_point, planet_osm_roads and planet_osm_line and indexing worked fine. The geometry type of column which was failed to index is ST MultiPolygon ( I am not sure if this is the cause).
    Apparently, the data is imported to database. I tried to create index on that table, and it returns the same error.
    CREATE INDEX PLANET_OSM_POLYGONI ON PLANET_OSM_POLYGON(ORA_GEOMETRY)
    INDEXTYPE IS MDSYS.SPATIAL_INDEX;
    Please help!

    Hi Ivan Bush
    Thank you for the reply.
    Sorry for the lengthy reply. To be honest, I dont understand how to read query result. This is the query that I executed:
    select * from (select sdo_geom.validate_geometry_with_context(p.ora_geometry, 0.05) from planet_osm_polygon p) where rownum <100;
    And the snippet of the query result:
    Could you help me to explain the meaning of the query result? I chose 0.05 as tolerance value based on this reference (http://docs.oracle.com/cd/B19306_01/appdev.102/b14255/sdo_intro.htm#i884589) .
    Anyway, this information might be useful in solving the problem. When I imported the OSM data to PostGis, the SRID of geometry data was 900913. Since I want the data in WGS84 coordinate system, I change the SRID of the geometry data to 4326. I could perform this below-mentioned PostgreSQL query to change its SRID for geometry column in table planet_osm_point, planet_osm_roads and planet_osm_line. However, this query did not work on planet_osm_polygon one since this query does not recognize multipolygon datatype.
    ALTER TABLE planet_osm_point
        ALTER COLUMN way TYPE geometry(point,4326) USING ST_Transform(way,4326);
    So for planet_osm_polygon case, I check this post (QGIS, Postgis: Geometry type does not match column type - Geographic Information Systems Stack Exchange) and follow @dbaston's answer to change the geometry data type to generic'geometry'. Then change the SRID, and return the geometry data type to MultiPolygon.
    ALTER TABLE planet_osm_polygon ALTER  COLUMN way SET data type geometry(MultiPolygon) USING ST_Multi(way);
    Let me know if this might be the cause of the indexing problem.

  • [solved] problems creating spatial index on SDO_ORDINATE_ARRAY in 11g

    We have a problem to create a spatial index on a field with geometries as SDO_ORDINATE_ARRAY points (3d) in 11g. The same method worked well in version 10.
    Test case:
    Create a new table:
    CREATE TABLE "TESTUSER"."MYTEST"
    "ID" VARCHAR2(15 BYTE),
    "GEOM" "MDSYS"."SDO_GEOMETRY"
    Register the GEOM field:
    INSERT INTO USER_SDO_GEOM_METADATA VALUES
    ('MYTEST', 'GEOM',
    MDSYS.SDO_DIM_ARRAY(
    MDSYS.SDO_DIM_ELEMENT('X',4287662.44360155,4609289.08479709,5E-7),
    MDSYS.SDO_DIM_ELEMENT('Y',5259525.06564855,5586464.07446503,5E-7),
    MDSYS.SDO_DIM_ELEMENT('Z',0,10000,5E-7)),
    31464);
    Add some data:
    INSERT INTO MYTEST ("ID", "GEOM") VALUES
    ('1', SDO_GEOMETRY(
    3001,
    31464,
    NULL,
    SDO_ELEM_INFO_ARRAY(1,1,1),
    SDO_ORDINATE_ARRAY(4506206.54518109,5300630.21512683,459.255030927715,null)
    Create spatial index
    CREATE INDEX MYTEST_GIX ON MYTEST
    "GEOM"
    INDEXTYPE IS "MDSYS"."SPATIAL_INDEX";
    The index will be created, but the building of the index will fail with the following error:
    Error report:
    SQL Error: ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
    ORA-13249: internal error in Spatial index: [mdidxrbd]
    ORA-13249: Error in Spatial index: index build failed
    ORA-13249: Error in spatial index: [mdrcrtxfergm]
    ORA-13249: Error in spatial index: [mdpridxtxfergm]
    ORA-13200: internal error [ROWID:AACq+7AAEAAACscAAA] in spatial indexing.
    ORA-13206: internal error [] while creating the spatial index
    ORA-13033: Invalid data in the SDO_ELEM_INFO_ARRAY in SDO_GEOMETRY object
    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.
    Has anyone already experienced this problem or do you have any idea on how to solve it?
    Regards. Carsten
    Edited by: Carsten Heidmann on 14.02.2011 07:20: wrong tablename
    Edited by: Carsten Heidmann on 14.02.2011 08:45

    Uhm - it seems we had an error in our data. The points 4d with NULL in the fourth dimension.
    Edited by: Carsten Heidmann on 14.02.2011 08:46

  • Problems building a spatial index - this must be a bug please help!

    Hi,
    We have a rather large spatial data warehouse. The schema is a star schema and is partitioned. During a load recently we had an error with one particular dataset, when building the index we got:
    ERROR at line 1:
    ORA-29855: error occured in the execution of ODCIINDEXCREATE routine
    ORA-06512: at "MDSYS.SDO_INDEX_METHOD_10I", line 10
    We have seen this kind of thing before, but usually dropping the data and reloading works fine (or rebuild the index). I should not that this obviously occurs before the partition is exchanged in. We are running 10.2.0.2 on red hat ES3.
    With this error we tried to reload the data, but get the same. We tried the data on another copy of the system, and the same. We have tried the data on a 10.2.0.3 and an 11.1.0.6 database and all fail at the same location. We have validated the geometries - all fine, I have tried changing the DIMINFO so that it spans the whole globe, it failes again (by the way we are on SRID 8307 and all data is point type). The data is approx 1.2M rows and I have tried subdividing it up into smaller tables and these all build fine. I have partitions with much higher row counts and these are fine. I have tried everything possible including changing index parameters e.g. parallel tablespace etc. I have tried it on a tablespace without ASSM and one with and both fail. I have an export of the data if anyone would be available to try it?
    I would really appreciate any help at all on this one.
    Thanks
    Jonathan

    There was a post a few months ago that addressed issues with 10.2.0.3 and Spatial index creation: Re: Fixed ...
    -Justin

  • Performance problem at bulk insert with spatial index

    Hi,
    I have a table with SDO_GEOMETRY.
    Insert without spatial index is very fast, but with active spatial index it's very slow.
    So for the first big import of data, I can drop the index, import the data and again create the index. Thats 10 times faster!
    But for an already very big table that is no option.
    The 10g1-Users Guide (1) says at 4.1.3 that the spatial index should be set to 'deferred', the data should be inserted and than the index should be synchronized again. That sounds very good, but I can't find this at the 11g1-Users Guide.
    I tried it (11g1), but the performance is even worse than with active index!
    What could be my mistake? Any hints?
    Thank you,
    Bjoern Weitzig
    create table sggeoptcollection (pt SDO_GEOMETRY);
    CREATE INDEX myIdx ON sggeoptcollection (pt) INDEXTYPE IS MDSYS.SPATIAL_INDEX PARAMETERS('sdo_indx_dims=2, layer_gtype=point, sdo_rtr_pctfree=50');
    ALTER INDEX myIdx PARAMETERS ('index_status=deferred');
    Big import with batch'ed PreparedStatements
    ALTER INDEX myIdx PARAMETERS ('index_status=synchronize sdo_batch_size=500');
    1) http://download.oracle.com/docs/html/B10826_01/sdo_index_query.htm#g1010227

    Hi,
    I have a table with SDO_GEOMETRY.
    Insert without spatial index is very fast, but with active spatial index it's very slow.
    So for the first big import of data, I can drop the index, import the data and again create the index. Thats 10 times faster!
    But for an already very big table that is no option.
    The 10g1-Users Guide (1) says at 4.1.3 that the spatial index should be set to 'deferred', the data should be inserted and than the index should be synchronized again. That sounds very good, but I can't find this at the 11g1-Users Guide.
    I tried it (11g1), but the performance is even worse than with active index!
    What could be my mistake? Any hints?
    Thank you,
    Bjoern Weitzig
    create table sggeoptcollection (pt SDO_GEOMETRY);
    CREATE INDEX myIdx ON sggeoptcollection (pt) INDEXTYPE IS MDSYS.SPATIAL_INDEX PARAMETERS('sdo_indx_dims=2, layer_gtype=point, sdo_rtr_pctfree=50');
    ALTER INDEX myIdx PARAMETERS ('index_status=deferred');
    Big import with batch'ed PreparedStatements
    ALTER INDEX myIdx PARAMETERS ('index_status=synchronize sdo_batch_size=500');
    1) http://download.oracle.com/docs/html/B10826_01/sdo_index_query.htm#g1010227

  • Problem in creating Spatial index

    Hi,
    I am trying to create Spatial index on my function. Unsuccessfully.
    I created function:
    create or replace
    FUNCTION VRAT_GEOMETRII(obj_id NUMBER)
    RETURN MDSYS.SDO_GEOMETRY
    DETERMINISTIC
    as
    test1 MDSYS.SDO_GEOMETRY;
    prikaz VARCHAR2(32767);
    BEGIN
    prikaz:='SELECT SDO_PC_PKG.TO_GEOMETRY(
    points,
    num_points,
    3) from pc_blktab2 WHERE obj_id ='||obj_id;
    EXECUTE IMMEDIATE prikaz INTO test1 ;
    RETURN test1;
    END;
    Updated metadata:
    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
    and I want to create spatial index:
    CREATE INDEX test_blok3_idx
    ON PC_BLKTAB2(VRAT_GEOMETRII(obj_id))
    INDEXTYPE IS MDSYS.SPATIAL_INDEX;
    but have these errors:
    Error report:
    SQL Error: ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
    ORA-13249: internal error in Spatial index: [mdidxrbd]
    ORA-13249: Error in Spatial index: index build failed
    ORA-13249: Error in spatial index: [mdrcrtxfergm]
    ORA-13249: Error in spatial index: [mdpridxtxfergm]
    ORA-29400: data cartridge error
    ORA-01422: exact fetch returns more than requested number of rows
    ORA-06512: at "ST_MKARA.VRAT_GEOMETRII", line 12
    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.
    Thanks for help
    Kirin

    This looks like a problem in your function.
    Make sure you can execute that function successfully for each obj_id.
    Looks like for certain obj_id, the SQL inside your function is failing (returns more than one row).
    siva

Maybe you are looking for

  • Opening a word doc from HTML in IE

    Hi Guys, In my portal, i have one html page, where there is a link to open a word document, if i click on that link, it is directly showing the content on the html page, rather than asking for whether you want to save that word file or open a file or

  • Executing Oracle DB Procedure from JACL Script

    May I know if JACL DBAdmin class has method to call stored procedures? I am able to call prepareCall() method from my jacl, however when I call preparecall() method by passing the procedure name as argument it is giving me below error may I know usag

  • FAGLF101:missing account

    Dear all, Iu2019m working in FAGLF101 and  trying to transfer a receivable account to a payable account . First of all, I created, in Receivables menu (T-code OBBU), a new entry with Reconciliation Account (A533901000: the receivable account), Target

  • Brand new pro shuts itself down after 30 seconds

    Help please! I bought Mac Pro two months ago and have used it mainly for pages, internet browsing and watching movies from my external hard drive. Since I've had it, it has gone to sleep (black screen) after just a few minutes of not touching the key

  • Can I instal in another computer my adobe license?

    I have a Adobe license and I want instal Photoshop in a another computer. How can I do that?