Error in spatial index

Hi, everyone
I created a spatial index on a table, but i get the error message:
ORA-13033: the data in sdo_elem_info_array of sdo_geometry is unavailable
How can i write a SQL command to delete those unavailable records?

Hi,
here you find an example with a similar error. You simply can validate the spatial data, to find invalid records:
DROP   TABLE sdo_test;
CREATE TABLE sdo_test (
  nr      NUMBER,
  GEOM     MDSYS.SDO_GEOMETRY);
COMMIT;
--correct
INSERT INTO sdo_test VALUES (1,
  SDO_GEOMETRY(3302, 8307, NULL, SDO_ELEM_INFO_ARRAY(1, 2, 1),
    SDO_ORDINATE_ARRAY(-87.899771, 42.000853, 0, -87.899109, 42.000847, 54.8504622)));
--correct
INSERT INTO sdo_test VALUES (2,
  SDO_GEOMETRY(3302, 8307, NULL, SDO_ELEM_INFO_ARRAY(1, 2, 1),
    SDO_ORDINATE_ARRAY(-87.917489, 41.992077, 0, -87.917063, 41.99174, 51.4503307)));
--empty SDO_ELEM_INFO_ARRAY
INSERT INTO sdo_test VALUES (3,
  SDO_GEOMETRY(3302, 8307, NULL,  SDO_ELEM_INFO_ARRAY(),
    SDO_ORDINATE_ARRAY(-87.925704, 41.965994, 0, -87.925705, 41.965445, 60.9789892)));
DELETE FROM USER_SDO_GEOM_METADATA
  WHERE TABLE_NAME = 'SDO_TEST' AND COLUMN_NAME = 'GEOM' ;
INSERT INTO USER_SDO_GEOM_METADATA (TABLE_NAME, COLUMN_NAME, DIMINFO, SRID)
  VALUES ('SDO_TEST', 'GEOM',
    MDSYS.SDO_DIM_ARRAY
      (MDSYS.SDO_DIM_ELEMENT('X', -87.925705, -87.8991090, 0.001),
       MDSYS.SDO_DIM_ELEMENT('Y',  41.965445,  41.9654450, 0.001),
       MDSYS.SDO_DIM_ELEMENT('M',    0.00000,  60.9789892, 0.001)
     ),8307);
--DROP   INDEX sdo_test_geom_spix;
--ORA ERROR 13033
CREATE INDEX sdo_test_geom_spix
          ON sdo_test(geom)
   INDEXTYPE IS MDSYS.SPATIAL_INDEX
PARAMETERS('sdo_indx_dims=2');
--find the invalid record
SELECT nr, SDO_GEOM.VALIDATE_GEOMETRY(geom,0.001) val
  FROM sdo_test;
nr     val
1    TRUE
2    TRUE
3    13033
oops - where is the PREVIEW button in the new design ?!
In the meantime found the Syntax Highlighting (->Switch to the advanced editor, paste your code, mark it, click the >> (insert) button, select Syntax Highlighting, choose the style...>

Similar Messages

  • ORA-29855 - Error creating Spatial Index using a Stored Procedure

    Hi
    I am using Oracle 10gR2 database and I have written a stored procedure to create spatial index. But when i execute this function i get the following error message.
    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 R-tree: [mdrcrtscrt]
    ORA-13231: failed to create index table [MDRT_217C1$] during R-tree creation
    ORA-13249: Stmt-Execute Failure: CREATE TABLE FGDABZ40.MDRT_217C1$ (NODE_ID NUMBER, NODE_LEVEL NUMBER, INFO BLOB) LOB (INFO) STORE AS (CACHE) NOLOGGING PCTFREE 2
    ORA-29400: data cartridge error
    ORA-01031: insufficient privileges
    ORA-06512: at "MDSYS.SDO_INDEX_METHOD_10I", line 10
    ORA-06512: at line 1
    ORA-06512: at "FGDABZ40.PKG_PSSDBE_APPLICATION", line 298
    ORA-06512: at line 17
    The tables that i am passing are registered in metadata and I am able to create indexes directly in sql plus. But when i try to create using this stored procedure, it fails.
    it should be possible to create indexes using a generic function. Has any faced a similar problem?
    regards
    sam

    Hi,
    I am having a same error on Oracle 10gR2 database. When I execute the same statement in sqlplus, it works. But it gives this error when I call the procedure which has this create spatial index statement.
    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 R-tree: [mdrcrtscrt]
    ORA-13231: failed to create index table [MDRT_20CDA$] during R-tree creation
    ORA-13249: Stmt-Execute Failure: CREATE TABLE "SDOMGR".MDRT_20CDA$ (NODE_ID NUMBER, NODE_LEVEL NUMBER, INFO BLOB) LOB (INFO) STORE AS (CACHE) NOLOGGING PCTFREE 2
    ORA-29400: data cartridge error
    ORA-01031: i
    Any help will be appreciated.
    Thanks,
    Sri

  • Error creating spatial indexes

    I'm using oracle 10g2.
    I retrieve the following error message during spatial index creation:
    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-13236: internal error in R-tree processing: [failed to cluster in memory]
    ORA-13232: failed to allocate memory during R-tree creation
    ORA-13236: internal error in R-tree processing: [failed to allocate memory
    4387752 (mdrtsalloc)]
    ORA-04031: unable to allocate ORA-04031: unable to allocate 4387800 bytes of
    shared memory ("large pool","unknown object","koh-kghu sessi","kpmalloc")
    bytes of shared memory ("","","","")
    ORA-06512: at "MDSYS.SDO_INDEX_METHOD_10I", line 10
    I've already tried to increase memory, shared and large pool, actually I have the following settings:
    Shared pool 500
    Buffer cache 200
    Large pool 200
    Pool Java 20
    I've already installed data and created spatial indexes on other machine correctly with the same data with less memory use, and I can't find any difference.
    Could anybody help me?

    Andre,
    I didn't think the , and ; in the sdo_geom_metadata would be causing the problem because he indicated that he could build indexes on other data - I assume he uses the same diminfo values for these as well. But, one can never be too sure!
    But certainly, follow what the error messages indicate.
    The Oracle Error message manual says:
    "ORA-13232: failed to allocate memory during R-tree creation
    Cause: This feature assumes a minimum of 64K memory for bulk creation.
    Action: Create the index for a small subset of the data. Then, use transactional insert operations for the rest of the data."
    The spatial manual says:
    "Before you create a spatial index, be sure that the rollback segment size and the SORT_AREA_SIZE parameter value are adequate, as described in Section 4.1.1."
    One way to change the sort area size is to alter your existing session before
    executing the create index statement. So, from 4.1.1. this can be done via:
    ALTER SESSION SET SORT_AREA_SIZE = 20000000;
    Also, do what Andre suggests. On my laptop with 1G of memory as a matter of course I change the SGA from the default to being much larger.
    regards
    S

  • ERROR creating spatial index

    Hi all.
    I have a problem during the creation of a spatial index for a table column.
    The metadata is in the USER_SDO_GEOM_METADATA VIEW, but Oracle throws the message:
    ORA-29855: se ha producido un error en la ejecución de la rutina ODCIINDEXCREATE
    ORA-13203: fallo al leer la vista USER_SDO_GEOM_METADATA
    ORA-13203: fallo al leer la vista USER_SDO_GEOM_METADATA
    ORA-06512: en "MDSYS.SDO_INDEX_METHOD_10I", línea 10
    The code that i use to create the index is:
    DELETE FROM USER_SDO_GEOM_METADATA;
    INSERT INTO USER_SDO_GEOM_METADATA
    VALUES (
    'E011_CIUDADES',
    'F011_GEO',
    MDSYS.SDO_DIM_ARRAY(
    MDSYS.SDO_DIM_ELEMENT('Longitud', -180, 180, 10), -- 10 meters tolerance
    MDSYS.SDO_DIM_ELEMENT('Latitud', -90, 90, 10) -- 10 meters tolerance
    8307 -- SRID for 'Longitude / Latitude (WGS 84)' coordinate system
    CREATE INDEX IX_SPATIAL_011_GEO
    ON SYSTEM.E011_CIUDADES(F011_GEO)
    INDEXTYPE IS MDSYS.SPATIAL_INDEX
    PARAMETERS ('tablespace=ASOUSU');
    I will apreciate any help. Thanks.

    This is very bad:
    CREATE INDEX IX_SPATIAL_011_GEO ON SYSTEM.E011_CIUDADES(F011_GEO)
      INDEXTYPE IS MDSYS.SPATIAL_INDEX PARAMETERS ('tablespace=ASOUSU');It means you've stored spatial data in the SYSTEM user's schema, which, as noted, is mucho malo. Either that, or it is a typo and that is why you got: fallo al leer la vista USER_SDO_GEOM_METADATA

  • Error creating Spatial Index - ORA-29855

    I have a DB in 11g that I used SQL Developer to copy to my local machine, 10g installation. I copied the same kind of databases around a lot but this is the first time I'm getting this error, when creating the spatial index.
    For this table I only copy the DDL and then run a .sql file with lot's of inserts and now I'm trying to create the spatial index.
    So I tried:
    CREATE INDEX location_spatial_idx ON location(locationcoordinates) INDEXTYPE IS MDSYS.SPATIAL_INDEX;
    And got:
    ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
    ORA-13203: failed to read USER_SDO_GEOM_METADATA view
    ORA-13203: failed to read USER_SDO_GEOM_METADATA view
    ORA-06512: at "MDSYS.SDO_INDEX_METHOD_10I", line 10
    My DB is:
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
    I tried running the create index as SYSDBA with no luck.
    select * from mdsys.sdo_index_metadata_table -> empty for this user owner
    select sdo_index_name from user_sdo_index_metadata -> empty
    SELECT * FROM SDO_INDEX_METADATA -> empty
    So... any clue on what I'm doing wrong?

    user10768987 wrote:
    ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
    ORA-13203: failed to read USER_SDO_GEOM_METADATA view
    So... any clue on what I'm doing wrong?I would think that Oracle is quite clearly telling you what is wrong here: Your table is not in the metadata.
    If you simply create the DDL for the table and create the insert statements from SQL Developer, it won't create the insert into user_sdo_geom_metadata....
    And in order to create a spatial index, the table MUST be in the user_sdo_geom_metadata, whether you try to create the index as SYSDBA or as the owner of the table.
    Regards,
    Stefan
    Edited by: Stefan Jager on Jun 4, 2013 9:14 AM

  • ODCIIndexStart error in Spatial Index Advisor

    Folks,
    I am getting the following error when attempting to zoom in on a layer in the spatial index advisor:
    Initialization error: server object could not be initialized
    ORA-29902: error in executing ODCIIndexStart() routine
    ORA-06502: PL/SQL: numeric or value error
    ORA-06512: at "MDSYS.SDO_CS", line 236
    I have seen similar sorts of complaints from a number of people in the forums but no clear explanation of what is causing the problem or how to resolve it.
    I did a bunch of experiments and I have come to the conclusion that the problem only occurs with layers that have 3 dimensions and are geodetic. If I force a projected SRID to be used for the layer (and all component geometries) then the problem goes away. Or if I force the layer to be only 2D then it works fine.
    I have also tried using "geodetic=false" and "sdo_indx_dims=2" when creating the spatial index, and these did not seem to help at all.
    The problem is occuring for me in the spatial index advisor, but my understanding from my client is that it also occurs in other contexts, so I don't think this is specifically a spatial index advisor problem.
    I would add that I believe I am running 9.2.0.1.0 on Windows XP.
    I found I was able to reproduce the problem creating an indexing a layer as follows then opening it in the spatial index advisor and trying to zoom in:
    -- Cleanup
    drop index idx_test1 force;
    drop table test1;
    delete from user_sdo_geom_metadata where table_name = 'TEST1';
    --Here's my table:
    CREATE TABLE test1
    PNT_ID NUMBER(17) NOT NULL,
    ORA_GEOMETRY MDSYS.SDO_GEOMETRY
    --Here's my insert:
    INSERT INTO test1
    VALUES ( 1, MDSYS.SDO_GEOMETRY(
    3001, 8192, MDSYS.SDO_POINT_TYPE(60.8996766, -32.606364, 0), NULL, NULL
    COMMIT;
    -- of course I did the insert into the metadata table...
    INSERT INTO USER_SDO_GEOM_METADATA
    VALUES (
    'TEST1',
    'ora_geometry',
    MDSYS.SDO_DIM_ARRAY(
    MDSYS.SDO_DIM_ELEMENT('X', 50, 70, 0.0005),
    MDSYS.SDO_DIM_ELEMENT('Y', -40, -30, 0.0005),
    MDSYS.SDO_DIM_ELEMENT('Z', -10, 10, 0.0005)),
    8192
    COMMIT;
    CREATE INDEX idx_test1
    ON test1(ora_geometry)
    INDEXTYPE IS MDSYS.SPATIAL_INDEX
    I would appreciate any feedback on why this doesn't work and if there is a more elegant way of resolving the problem beside discarding my elevation values.

    This is reproducable in 9.2.0.4. I couldn't find a bug entered for it.
    I entered bug 3149274.
    There is a similar bug (2409529) that breaks projected layers.

  • SDO_GEOM error creating spatial index

    Hi,
    We are attempting to create a spatial index on column, GEOM, for a transit lines table but got the error "SDO_Geometry is not a valid column type for use in a text index". The source data is a shapefile. We used both FME and an Oracle conversion tool to convert the shapefiles into an Oracle table (both methods led to the same error). We also created the metadata and validated the geometry.
    Has anyone had this issue?
    Thanks,
    Renee

    If you have issues, best is to copy also your sql statements and error messages to your post.
    Have you tried creating your index with the following syntax?
    CREATE INDEX your_index_name ON your_table_name(geom)
    INDEXTYPE IS MDSYS.SPATIAL_INDEX

  • Errors when creating spatial index

    Hi,
    I am new to OTN and oracle technology. I met a problem as I wanted to create a spatial index.
    I created a table 'geoobject' with a column 'shape' of sdo_geometry.
    The I run the following script:
    insert into user_sdo_geom_metadata values ('geoobject', 'shape',
    mdsys.sdo_dim_array(
    mdsys.sdo_dim_element('latitude', 0.0000, 50.0000, 0.000050),
    mdsys.sdo_dim_element('longitude', 0.0000, 80.0000, 0.000050)), 8265
    after that I insert data into the table:
    update geoobject set shape=
    mdsys.sdo_geometry(2001, 8265,
    mdsys.sdo_point_type
    (to_number((select latitude from temp_location where temp_location.gid = geoobject.geo_id)),
    to_number((select longitude from temp_location where temp_location.gid = geoobject.geo_id)), null),
    null, null);
    Then I wanted to create the spatial index:
    create index geoobject_idx on geoobject(shape)
    indextype is mdsys.spatial_index;
    But I got the error messages:
    Error in line 1:
    ORA-29855: Fehler bei Ausführung der Routine ODCIINDEXCREATE (Error at running routine ODCIINDEXCREATE)
    ORA-13249: internal error in Spatial index: [mdidxrbd]
    ORA-13249: Error in Spatial index: index build failed
    ORA-13230: Temporäre Tabelle [temp-table: M2_7A21$$] konnte während Erstellen von R-Baum nicht erstellt werden
    (temporary tables could not be established when R-tree was generated)
    ORA-29400: Data Cartridge-Fehler
    ORA-01659: Kann MINEXTENTS über 2 in Tablespace AMSDB hinaus nicht zuweisen
    ORA-06512: in "MDSYS.SDO_INDEX_METHOD_9I", Zeile 7
    ORA-06512: in Zeile 1
    I read some messages from the OTN forum and got to know to test the data with the following script:
    SELECT geo_id FROM geoobject
    WHERE SDO_GEOM.VALIDATE_GEOMETRY_WITH_CONTEXT(shape, .005) <> 'TRUE';
    All data passed this test.
    Could somebody give me some suggestions?
    regards,
    Yiwei

    My spatial index has been successfully generated after i enlarged the tablespace. But I encounter a new problem.
    I have saved many points in the table. I can use oracle spatial analyzer to see all the points. But as I tried to run the following query according to the examples in the oracle spatial user guider, I always get error messages. I have no idea about which problems there might be.
    The Query is:
    select geo_id, geo_name from geoobject g
    where mdsys.sdo_filter
    (g.shape, mdsys.sdo_geometry
    (2003, null, null,
    mdsys.sdo_elem_info_array(1, 1003, 1),
    mdsys.sdo_ordinate_array(25.00, 60.00, 25.00, 70.00, 35.00, 70.00, 35.00, 60.00, 25.00, 60.00)
    ), 'querytype=WINDOW') ='true'
    and sdo_relate
    (g.shape, mdsys.sdo_geometry
    (2003, null, null,
    mdsys.sdo_elem_info_array(1, 1003, 1),
    mdsys.sdo_ordinate_array(25.00, 60.00, 25.00, 70.00, 35.00, 70.00, 35.00, 60.00, 25.00, 60.00)
    ), 'masktype=TOUCH querytype=WINDOW') ='true';
    The error messages are:
    ERROR in line 1:
    ORA-29902: Fehler bei der Ausführung von Routine ODCIIndexStart()
    ORA-13207: Falsche Benutzung des Operators [SDO_FILTER]
    ORA-06512: in "MDSYS.SDO_INDEX_METHOD_9I", Zeile 368
    ORA-06512: in Zeile 1
    I use SRID = 8307, I want to use Geodetic Coordinate Support. For that reason, as I insert the information into the database, I just insert '8307' as the SRID both in the geo table and in the table user_sdo_geom_metadata. Except for that I did nothing which seems to be related to support geodetic coordination system. I think the problems might be here.
    I am looking forward to helps.
    Yiwei

  • Spatial Index Creation Error on 9.2.0.1

    Hi,
    I can´t create a spatial index on an Oracle 9.2.0.1, Windows 2000 Server. I create the table, register metadata and when I try to create the index the folowing error is returned (some messages in Portuguese):
    ORA-29855: ocorreu um erro na execução da rotina ODCIINDEXCREATE
    ORA-13249: Error executing stmt: begin mdsys.prvt_idx.execute_insert(NULL, NULL, ' VALUES (''TESTUSER'',''MDIDX_INIT'', 0, 0, 64, -1, NLS_UPPER(''MDRT_7844$''), ''I_SDOTEST'', 1, ''TESTUSER'', ''"GEOM"'', 0, 0, 2, 0, ''DEFAULT'', ''DEFAULT'', NULL,NULL, NULL, NULL, NULL, NULL, NULL, 2, ''DEFAULT'', 10, NULL, NULL, NULL, NULL, ''FALSE'', ''VALID'', NULL)', NULL); end;
    ORA-13249: Error in Spatial index: insert to metadata failed
    ORA-29400: erro no cartucho de dados
    ORA-00913: valores demais
    ORA-06512: em "MDSYS.PRVT_IDX", line 5
    ORA-06512: em line 1
    ORA-06512: em "MDSYS.SDO_INDEX_METHOD_9I", line 7
    ORA-06512: em line 1
    The same error occurs with other database users.
    On my notebook (Windows XP) with the same Oracle version installed the index is created succesfully.
    What can be wrong on the server ?
    Thanks.

    When I connect through sqlplus it shows:
    SQL*Plus: Release 9.2.0.1.0 - Production on Mon Jun 14 17:14:33 2004
    Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
    Connected to:
    Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
    With the OLAP and Oracle Data Mining options
    JServer Release 9.2.0.1.0 - Production
    SQL>
    The select on dba_registry returns:
    COMP_ID     COMP_NAME               VERSION          STATUS     MODIFIED          CONTROL     SCHEMA     PROCEDURE     STARTUP     PARENT_ID
    CATALOG     Oracle9i Catalog Views          9.2.0.1.0     VALID     14-JUN-2004 15:59:45     SYS     SYS     DBMS_REGISTRY_SYS.VALIDATE_CATALOG          
    CATPROC     Oracle9i Packages and Types     9.2.0.1.0     VALID     14-JUN-2004 15:59:45     SYS     SYS     DBMS_REGISTRY_SYS.VALIDATE_CATPROC          
    OWM     Oracle Workspace Manager     9.2.0.1.0     VALID     14-JUN-2004 15:59:45     SYS     WMSYS     OWM_VALIDATE          
    JAVAVM     JServer JAVA Virtual Machine     9.2.0.1.0     VALID     12-MAI-2002 16:55:28     SYS     SYS               
    XML     Oracle XDK for Java          9.2.0.2.0     VALID     14-JUN-2004 15:59:45     SYS     SYS     XMLVALIDATE          
    CATJAVA     Oracle9i Java Packages          9.2.0.1.0     VALID     14-JUN-2004 15:59:45     SYS     SYS     DBMS_REGISTRY_SYS.VALIDATE_CATJAVA          
    ORDIM     Oracle interMedia          9.2.0.1.0     LOADED     12-MAI-2002 17:27:10     SYS     ORDSYS               
    SDO     Spatial                    9.2.0.1.0     LOADED     12-MAI-2002 17:40:16     SYS     MDSYS               
    CONTEXT     Oracle Text               9.2.0.1.0     VALID     12-MAI-2002 17:32:11     CTXSYS     CTXSYS               
    XDB     Oracle XML Database          9.2.0.1.0     VALID     14-JUN-2004 15:59:55     SYS     XDB     DBMS_REGXDB.VALIDATEXDB          
    WK     Oracle Ultra Search          9.2.0.1.0     VALID     12-MAI-2002 17:44:01     WKSYS     WKSYS     WK_UTIL.VALID          
    ODM     Oracle Data Mining          9.2.0.1.0     LOADED     12-MAI-2002 17:49:36     SYS     ODM               
    APS     OLAP Analytic Workspace          9.2.0.1.0     LOADED     12-MAI-2002 17:58:32     SYS     SYS               
    XOQ     Oracle OLAP API               9.2.0.1.0     LOADED     12-MAI-2002 17:59:07     SYS     SYS               
    AMD     OLAP Catalog               9.2.0.1.0     INVALID     14-JUN-2004 15:59:57     SYS     OLAPSYS     CWM2_OLAP_INSTALLER.VALIDATE_CWM2_INSTALL
    Any ideas ?     

  • Rebuilding spatial indexing fail after patch 9.2.0.8.0

    Hi!
    I did apply patchset, and after i did try to
    set NLS_LANG=American_America.CL8MSWIN1251
    sqlplusw ......
    SQL> alter index XXXX.YYYYYYYY_g_idx rebuild; -- <- Russian name
    alter index XXXX.YYYYYYYY_g_idx rebuild
    ERROR at line 1:
    ORA-29858: error occurred in the execution of ODCIINDEXALTER routine
    ORA-29400: data cartridge error
    ¡a¤
    ORA-13249: internal error in Spatial index: [mdidxrbd]
    ORA-13205: internal error while parsing spatial parameters
    ORA-06512: at "MDSYS.SDO_INDEX_METHOD_9I", line 259
    ORA-06512: at line 1
    As you can see, rebuilding was failed.
    Before upgrade all did work fine.
    If i will create table WITH_ENGLISH_NAME as SELECT from my table all working fine ;(
    I DID apply all *.sql from patchset.
    Any idea, gurus ?
    P.S.
    I did use script from metalink
    verify_spatial_installation.sql :
    SQL>
    SQL> prompt Verify version and status
    Verify version and status
    SQL> select COMP_NAME, SCHEMA, VERSION, STATUS
    2 from dba_registry where comp_id='SDO';
    COMP_NAME SCHEMA VERSION STATUS
    Spatial MDSYS 9.2.0.8.0 VALID
    SQL>
    SQL> prompt Number of objects
    Number of objects
    SQL> select count(*)
    2 from dba_objects where owner='MDSYS';
    COUNT(*)
    250
    SQL>
    SQL> prompt Summary count of objects
    Summary count of objects
    SQL> select object_type, count(*)
    2 from dba_objects where owner='MDSYS'
    3 group by object_type;
    OBJECT_TYPE COUNT(*)
    FUNCTION 47
    INDEX 17
    INDEXTYPE 2
    LIBRARY 12
    LOB 12
    OPERATOR 14
    PACKAGE 25
    PACKAGE BODY 25
    SEQUENCE 2
    TABLE 18
    TRIGGER 7
    TYPE 34
    TYPE BODY 10
    VIEW 25
    14 rows selected.
    SQL>
    SQL> prompt Any invalid objects ?
    Any invalid objects ?
    SQL> select object_name, object_type, status
    2 from dba_objects
    3 where owner='MDSYS'
    4 and status <> 'VALID'
    5 order by object_name;
    OBJECT_NAME OBJECT_TYPE STATUS
    SDO_MIGRATE PACKAGE BODY INVALID
    SQL>
    SQL> prompt List of all spatial objects ordered by object_name
    List of all spatial objects ordered by object_name
    SQL> select object_name, object_type, status
    2 from dba_objects where owner='MDSYS'
    3 order by object_name;
    OBJECT_NAME OBJECT_TYPE STATUS
    AGGRCENTROID TYPE VALID
    AGGRCENTROID TYPE BODY VALID
    AGGRCONVEXHULL TYPE VALID
    AGGRCONVEXHULL TYPE BODY VALID
    AGGRLRSCONCAT TYPE VALID
    AGGRLRSCONCAT TYPE BODY VALID
    AGGRLRSCONCAT3D TYPE VALID
    AGGRLRSCONCAT3D TYPE BODY VALID
    AGGRMBR TYPE VALID
    AGGRMBR TYPE BODY VALID
    AGGRUNION TYPE VALID
    AGGRUNION TYPE BODY VALID
    ALL_GEOMETRY_COLUMNS VIEW VALID
    ALL_SDO_GEOM_METADATA VIEW VALID
    ALL_SDO_INDEX_INFO VIEW VALID
    ALL_SDO_INDEX_METADATA VIEW VALID
    ALL_SDO_LRS_METADATA VIEW VALID
    ALL_SDO_MAPS VIEW VALID
    ALL_SDO_STYLES VIEW VALID
    ALL_SDO_THEMES VIEW VALID
    CS_SRS TABLE VALID
    DBA_GEOMETRY_COLUMNS VIEW VALID
    DBA_SDO_INDEX_INFO VIEW VALID
    DBA_SDO_INDEX_METADATA VIEW VALID
    DBA_SDO_LRS_METADATA VIEW VALID
    DBA_SDO_MAPS VIEW VALID
    DBA_SDO_STYLES VIEW VALID
    DBA_SDO_THEMES VIEW VALID
    F81_INDEX_OBJECT TYPE VALID
    F81_INDEX_OBJ_ARRAY TYPE VALID
    F81_NT_IND_TYPE TYPE VALID
    GEOCODER_HTTP PACKAGE VALID
    GEOCODER_HTTP PACKAGE BODY VALID
    GEOCODE_RESULT TYPE VALID
    GEODETIC_SRIDS VIEW VALID
    H81_INDEX_OBJECT TYPE VALID
    H81_INDEX_OBJ_ARRAY TYPE VALID
    H81_NT_IND_TYPE TYPE VALID
    HHAND FUNCTION VALID
    HHBYTELEN FUNCTION VALID
    HHCBIT FUNCTION VALID
    HHCELLBNDRY FUNCTION VALID
    HHCELLSIZE FUNCTION VALID
    HHCLDATE FUNCTION VALID
    HHCOLLAPSE FUNCTION VALID
    HHCOMMONCODE FUNCTION VALID
    HHCOMPARE FUNCTION VALID
    HHCOMPOSE FUNCTION VALID
    HHDECODE FUNCTION VALID
    HHDISTANCE FUNCTION VALID
    HHENCODE FUNCTION VALID
    HHENCODE_BYLEVEL FUNCTION VALID
    HHGBIT FUNCTION VALID
    HHGETCID FUNCTION VALID
    HHGROUP FUNCTION VALID
    HHGTBIT FUNCTION VALID
    HHGTYPE FUNCTION VALID
    HHIDLPART FUNCTION VALID
    HHIDPART FUNCTION VALID
    HHINCRLEV FUNCTION VALID
    HHJLDATE FUNCTION VALID
    HHLENGTH FUNCTION VALID
    HHLEVELS FUNCTION VALID
    HHMATCH FUNCTION VALID
    HHMAXCODE FUNCTION VALID
    HHNCOMPARE FUNCTION VALID
    HHNDIM FUNCTION VALID
    HHOR FUNCTION VALID
    HHORDER FUNCTION VALID
    HHPRECISION FUNCTION VALID
    HHSBIT FUNCTION VALID
    HHSETCID FUNCTION VALID
    HHSTBIT FUNCTION VALID
    HHSTYPE FUNCTION VALID
    HHSUBDIVIDE FUNCTION VALID
    HHSUBSTR FUNCTION VALID
    HHXOR FUNCTION VALID
    LOCATOR_WITHIN_DISTANCE OPERATOR VALID
    MD PACKAGE VALID
    MD PACKAGE BODY VALID
    MD$RELATE TABLE VALID
    MD1 PACKAGE VALID
    MD1 PACKAGE BODY VALID
    MD2 PACKAGE VALID
    MD2 PACKAGE BODY VALID
    MDERR PACKAGE VALID
    MDERR PACKAGE BODY VALID
    MDPRVT_IDX PACKAGE VALID
    MDPRVT_IDX PACKAGE BODY VALID
    MD_LRS PACKAGE VALID
    MD_LRS PACKAGE BODY VALID
    OGIS_GEOMETRY_COLUMNS TABLE VALID
    OGIS_SPATIAL_REFERENCE_SYSTEMS TABLE VALID
    ORDMD_AG_LIBS LIBRARY VALID
    ORDMD_CS_LIBS LIBRARY VALID
    ORDMD_IDX_LIBS LIBRARY VALID
    ORDMD_LRS_LIBS LIBRARY VALID
    ORDMD_MBR_LIBS LIBRARY VALID
    ORDMD_MIG_LIBS LIBRARY VALID
    ORDMD_PRIDX_LIBS LIBRARY VALID
    ORDMD_REL_LIBS LIBRARY VALID
    ORDMD_RTREE_LIBS LIBRARY VALID
    ORDMD_UDT_LIBS LIBRARY VALID
    ORDMD_UTL_LIBS LIBRARY VALID
    ORDMD_WD_LIBS LIBRARY VALID
    PK_SDO_MASK INDEX VALID
    PK_SRID INDEX VALID
    PRVT_IDX PACKAGE VALID
    PRVT_IDX PACKAGE BODY VALID
    RTREE_FILTER OPERATOR VALID
    RTREE_IDX PACKAGE VALID
    RTREE_IDX PACKAGE BODY VALID
    RTREE_INDEX INDEXTYPE VALID
    RTREE_INDEX_METHOD TYPE VALID
    RTREE_INDEX_METHOD TYPE BODY VALID
    RTREE_NN OPERATOR VALID
    SAMPLE_SEQ SEQUENCE VALID
    SDO PACKAGE VALID
    SDO PACKAGE BODY VALID
    SDOAGGR TYPE VALID
    SDOAGGR TYPE BODY VALID
    SDOAGGRTYPE TYPE VALID
    SDO_3GL PACKAGE VALID
    SDO_3GL PACKAGE BODY VALID
    SDO_ADMIN PACKAGE VALID
    SDO_ADMIN PACKAGE BODY VALID
    SDO_AGGR_CENTROID FUNCTION VALID
    SDO_AGGR_CONVEXHULL FUNCTION VALID
    SDO_AGGR_LRS_CONCAT FUNCTION VALID
    SDO_AGGR_LRS_CONCAT_3D FUNCTION VALID
    SDO_AGGR_MBR FUNCTION VALID
    SDO_AGGR_UNION FUNCTION VALID
    SDO_ANGLE_UNITS TABLE VALID
    SDO_AREA_UNITS TABLE VALID
    SDO_CATALOG PACKAGE VALID
    SDO_CATALOG PACKAGE BODY VALID
    SDO_CONSTRUCT_DIM_ARRAY FUNCTION VALID
    SDO_CS PACKAGE VALID
    SDO_CS PACKAGE BODY VALID
    SDO_DATUMS TABLE VALID
    SDO_DIM_ARRAY TYPE VALID
    SDO_DIM_ELEMENT TYPE VALID
    SDO_DIST_UNITS TABLE VALID
    SDO_DROP_USER TRIGGER VALID
    SDO_ELEM_INFO_ARRAY TYPE VALID
    SDO_ELLIPSOIDS TABLE VALID
    SDO_FILTER OPERATOR VALID
    SDO_GEOM PACKAGE VALID
    SDO_GEOM PACKAGE BODY VALID
    SDO_GEOMETRY TYPE VALID
    SDO_GEOMETRY TYPE BODY VALID
    SDO_GEOM_IDX INDEX VALID
    SDO_GEOM_METADATA_TABLE TABLE VALID
    SDO_GEOM_TRIG_DEL1 TRIGGER VALID
    SDO_GEOM_TRIG_INS1 TRIGGER VALID
    SDO_GEOM_TRIG_UPD1 TRIGGER VALID
    SDO_IDX PACKAGE VALID
    SDO_IDX PACKAGE BODY VALID
    SDO_IDX_MDATA_IDX INDEX VALID
    SDO_IDX_TAB_SEQUENCE SEQUENCE VALID
    SDO_INDEX_METADATA_TABLE TABLE VALID
    SDO_INDEX_METHOD_9I TYPE VALID
    SDO_INDEX_METHOD_9I TYPE BODY VALID
    SDO_INT2_FILTER OPERATOR VALID
    SDO_INT2_RELATE OPERATOR VALID
    SDO_INT_FILTER OPERATOR VALID
    SDO_INT_RELATE OPERATOR VALID
    SDO_LRS PACKAGE VALID
    SDO_LRS PACKAGE BODY VALID
    SDO_LRS_METADATA_TABLE TABLE VALID
    SDO_LRS_META_IDX INDEX VALID
    SDO_LRS_TRIG_DEL TRIGGER VALID
    SDO_LRS_TRIG_INS TRIGGER VALID
    SDO_LRS_TRIG_UPD TRIGGER VALID
    SDO_MAPS_TABLE TABLE VALID
    SDO_MBR TYPE VALID
    SDO_META PACKAGE VALID
    SDO_META PACKAGE BODY VALID
    SDO_MIGRATE PACKAGE VALID
    SDO_MIGRATE PACKAGE BODY INVALID
    SDO_NN OPERATOR VALID
    SDO_NN_DISTANCE OPERATOR VALID
    SDO_NUMTAB TYPE VALID
    SDO_ORDINATE_ARRAY TYPE VALID
    SDO_POINT_TYPE TYPE VALID
    SDO_PRIDX PACKAGE VALID
    SDO_PRIDX PACKAGE BODY VALID
    SDO_PROJECTIONS TABLE VALID
    SDO_RELATE OPERATOR VALID
    SDO_RELATEMASK_TABLE VIEW VALID
    SDO_RELATE_MASK PACKAGE VALID
    SDO_RELATE_MASK PACKAGE BODY VALID
    SDO_RID_ARRAY TYPE VALID
    SDO_RTREE_ADMIN PACKAGE VALID
    SDO_RTREE_ADMIN PACKAGE BODY VALID
    SDO_RTREE_FILTER OPERATOR VALID
    SDO_RTREE_RELATE OPERATOR VALID
    SDO_STAT TYPE VALID
    SDO_STATTAB TYPE VALID
    SDO_STYLES_TABLE TABLE VALID
    SDO_THEMES_IDX INDEX VALID
    SDO_THEMES_TABLE TABLE VALID
    SDO_TUNE PACKAGE VALID
    SDO_TUNE PACKAGE BODY VALID
    SDO_UTIL PACKAGE VALID
    SDO_UTIL PACKAGE BODY VALID
    SDO_VERSION FUNCTION VALID
    SDO_VPOINT_TYPE TYPE VALID
    SDO_WITHIN_DISTANCE OPERATOR VALID
    SPATIAL_INDEX INDEXTYPE VALID
    SYS_C001565 INDEX VALID
    SYS_C001571 INDEX VALID
    SYS_C001706 INDEX VALID
    SYS_LOB0000027008C00040$$ LOB VALID
    SYS_LOB0000027008C00041$$ LOB VALID
    SYS_LOB0000027053C00012$$ LOB VALID
    SYS_LOB0000027053C00013$$ LOB VALID
    SYS_LOB0000027209C00004$$ LOB VALID
    SYS_LOB0000027216C00005$$ LOB VALID
    SYS_LOB0000027216C00006$$ LOB VALID
    SYS_LOB0000027216C00013$$ LOB VALID
    SYS_LOB0000027216C00014$$ LOB VALID
    SYS_LOB0000027229C00006$$ LOB VALID
    SYS_LOB0000028651C00012$$ LOB VALID
    SYS_LOB0000028651C00013$$ LOB VALID
    TRANSFORM_MAP PACKAGE VALID
    TRANSFORM_MAP PACKAGE BODY VALID
    UNIQUE_ANGLE_UNITS INDEX VALID
    UNIQUE_AREA_UNITS INDEX VALID
    UNIQUE_DIST_UNITS INDEX VALID
    UNIQUE_LAYERS INDEX VALID
    UNIQUE_MAPS INDEX VALID
    UNIQUE_STYLES INDEX VALID
    UNIQUE_TABLES INDEX VALID
    UNIQUE_THEMES INDEX VALID
    USER_CS_SRS TABLE VALID
    USER_GEOMETRY_COLUMNS VIEW VALID
    USER_SDO_GEOM_METADATA VIEW VALID
    USER_SDO_INDEX_INFO VIEW VALID
    USER_SDO_INDEX_METADATA VIEW VALID
    USER_SDO_LRS_METADATA VIEW VALID
    USER_SDO_MAPS VIEW VALID
    USER_SDO_STYLES VIEW VALID
    USER_SDO_THEMES VIEW VALID
    USER_TRANSFORM_MAP TABLE VALID
    V81_INDEX_OBJECT TYPE VALID
    V81_INDEX_OBJ_ARRAY TYPE VALID
    V81_NT_IND_TYPE TYPE VALID
    VERTEX_SET_TYPE TYPE VALID
    VERTEX_TYPE TYPE VALID
    250 rows selected.
    SQL>
    SQL> spool off

    Sir! No Sir! :)
    I will try to explain.
    If I do have table with russian letter, than creating index creation will fail, no matter name of index :(
    But if I will prepare copy of my table with english name (including meta-data) - index creations is succesfull.

  • Create a spatial index on a large table

    Hi all
    I think that I might be starting to push XE beyond what it is capable of, but I thought I would ask here to see if anyone has some ideas how to get around my problem.
    I have a table with around 8,000,000 record in it. It has position data in it (SDO_GEOMETRY) which I would like to index. The geometry is not complex, just a single point for each record. The SQL I use is
    CREATE INDEX "ANNOTATION_TEXT_SX" ON "ANNOTATION_TEXT" ("GEOLOC") INDEXTYPE IS "MDSYS"."SPATIAL_INDEX"
    The command fails, due to memory issues. The errors thrown are
    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-13236: internal error in R-tree processing: [failed to cluster in memory]
    ORA-13232: failed to allocate memory during R-tree creation
    ORA-13236: internal error in R-tree processing: [failed to allocate memory 7272216 (mdrtsalloc)]
    ORA-04031: unable to allocate ORA-04031: unable to allocate 7272264 bytes of shared memory ("lar
    I have done a bit of reading up, this type of error generally occurs when the tablespace runs out of memory. Since I am using the SYSTEM tablespace, I figure I am running it out to its capacity before the index is completed.
    I have not created any other tablespaces. Is this an option to allow the creation of the index? Storage and Memory are at about 60% capacity (due to this one table) so is it just too big to create a spatial index on in XE? Am I barking up the wrong tree?
    Cheers
    James

    Good to see you are not using the SYSTEM tablespace. (And no need to apologize too profusely for being new at this - we all were at one time.)
    It normally doesn't matter how many rows are involved. The issue is how much actual space those rows require. 8,000,000 rows is actually not a lot in the GIS world, esp. if all you have is simple point data. Using the sdo_point field instead of the arrays should be a lot more compact as well.
    Some steps I would take:
    - Identify the actual amount of space used, in total as well as by tablespace. (One of the web-based admin screens can show you this.)
    - Load it all up usnig the free 'developer license' Enterprise Edition insead of XE just to verify it'll work.
    - Try indexing a smaller data set and see whether that works. (Export the table first) Delete about 1/2 rows and try indexing.
    The ORA-04031 is really telling you something about the SGA is not big enough. One of the SGA pools is trying to extend by 7M. Post the info about your SGA, as well ass some details about your machine (disk/processor/total memory)
    Message was edited by:
    forbrich
    The actual error causing the problem is the last line. It ends with "la and the rest is cut off. Could it have said 'large pool'???

  • 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!

  • 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:

  • 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.

Maybe you are looking for