VALIDATE_GEOMETRY

Hello.. .dear friends: I need your help once again, I try to validate my geometry, I have two problems

SELECT NAME, SDO_GEOM. VALIDATE_GEOMETRY_WITH_CONTEXT (GEOMETRY, 0.05) OF ZONAS_RIESGO_INUNDACIONES2


Rows processed < 11 >

1-13368
2 - 13349 [< 2 > element] [ring < 1 >] [m < 19 >] [m < 14 >]

It's my index

CREATE INDEX ZONAS_RIESGO_INU2_IDX ON ZONAS_RIESGO_INUNDACIONES2 (GEOMETRY)
INDEXTYPE IS MDSYS. SPATIAL_INDEX PARAMETERS ('LAYER_GTYPE = MULTIPOLYGON');


SELECT SDO_GEOM. VALIDATE_GEOMETRY ('ZONAS_RIESGO_INUNDACIONES2', 8307) OF THE DOUBLE
result = false


SELECT NAME, SDO_GEOM. VALIDATE_GEOMETRY_WITH_CONTEXT (GEOMETRY, 0.05) OF ZONAS_RIESGO_INUNDACIONES2

1 zona riesgo inundacion TRUE
2 zona riesgo inundacion TRUE
3 zona riesgo inundacion TRUE
4 zona riesgo inundacion TRUE
5 zona riesgo inundacion TRUE
6 zona riesgo inundacion TRUE
7 zona riesgo inundacion TRUE
* 8 zona riesgo inundacion 13368 *.
* 9 zona riesgo inundacion 13349 [< 2 > element] [ring < 1 >] [edge < 19 >] [< 14 > Edge] *.
10 zona riesgo inundacion TRUE
11 zona riesgo inundacion TRUE

When I used SDO_UTIL. RECTIFY_GEOMETRY or SDO_UTIL used. REMOVE_INNER_RINGS or SDO_GEOM. SDO_UNION solve 13349
and the result of this function is null

How can I correct errors?

Hello

13368 means it is more then an outer ring but the geometry gtype is not set correctly.

I guess that if you mark the gtype, the value would be 2003 instead of 2007

Select a.geometry.sdo_gtype in the ZONAS_RIESGO_INUNDACIONES2 where your_filter_for_record _8

If this is the case you must update for 2007:

update of ZONAS_RIESGO_INUNDACIONES2 one
a.Geo, etry.sdo_gtype = 2007
where your_filter_for_record _8

The 13349 is something that you should try to fix it yourself by hand or through your GIS software. These are not easier to clean automatically.

And Yes, it seems that correct sometimes return null values so be careful.

Here is another discussion with similar facts:

Re: RECTIFY_GEOMETRY sets the null value!
Luke

Tags: Database

Similar Questions

  • sdo_within_distance return invalid results

    I use sdo_within_distance, and I notice that there are cases where results contain geometries that are outside the distance, I said. In the example below, the geometry is returned even if it is 4 miles from the reference geometry. If I use sdo_nn with the remote setting, the correct results are returned. DB version is 12.1.0.1.0

    Create the table testdistance

    (

    Identification number,

    geom sdo_geometry

    );

    Insert into testdistance (ID, GEOM) values (1, MDSYS. SDO_GEOMETRY (2001,4326, MDSYS. SDO_POINT_TYPE(-117.234313964844,32.7089462280273,), NULL, NULL));

    Insert into testdistance (ID, GEOM) values (477488906, MDSYS. SDO_GEOMETRY (2003,4326, NULL, MDSYS. SDO_ELEM_INFO_ARRAY (1,1003,1), MDSYS. SDO_ORDINATE_ARRAY(-117.175918579102,32.6773681640625,-117.17529296875,32.6780090332031,-117.174987792969,32.6778030395508,-117.17561340332,32.6771392822266,-117.175918579102,32.6773681640625)));

    insert into (table_name, column_name, diminfo, srid) user_sdo_geom_metadata

    values ('TESTDISTANCE', "GEOM", 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 testdistance_sidx on testdistance (geom) INDEXTYPE IS MDSYS. SPATIAL_INDEX;

    -results of evil

    WITH the entry INTO

    (SELECT / * + materialize * / idgeom )

    OF testdistance

    ID WHERE = 1

    )

    SELECT / * + index (testdistance, testdistance_sidx) * / testdistance.id, testdistance.geom, sdo_geom.sdo_distance (testdistance.geom, input.geom, 0.05, ' unit = mile') dist

    Testdistance entry

    WHERE sdo_within_distance (testdistance.geom, input.geom, 'distance = 2.5 unit = mile') = 'TRUE '.

    -correct results

    WITH the entry INTO

    (SELECT / * + materialize * / idgeom )

    OF testdistance

    ID WHERE = 1

    )

    SELECT / * + index (testdistance, testdistance_sidx) * / testdistance.id, testdistance.geomSDO_NN_DISTANCE (1) dist

    Testdistance entry

    WHERE sdo_nn (testdistance.geom, input.geom, 'distance = 2.5 thousand = unit', 1) = "TRUE".

    Geometry with id = 477488906 is not valid because its outer ring is

    in a clockwise direction. You can use the following query to check them.

    Select sdo_geom.validate_geometry (geom, 0.05), id testdistance;

    Once the geometry with id = 477488906 is corrected (e.g. using sdo_util.rectify_geometry),

    the result of sdo_within_distance() should be good.

  • Error in the spatial index

    Hello world

    I created a spatial index on a table, but I get the error message:

    ORA-13033: sdo_geometry sdo_elem_info_array data not available

    How can I write a SQL command to delete these unavailable records?

    Hello

    you will find an example with a similar error. Simply, you can validate spatial data, to find the 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 in the new design?

    Found while waiting for the syntax highlighting (-> switch to the Advanced Editor, paste your code, mark it, click on the > button (insert), select syntax highlighting, choose style... >)

  • Index space problem ORA-29902 ORA-13200 ORA-13220 ORA-06512

    I have problems by running the following query. If I change the values of the SDO_ORDINATE_ARRAY, some of the values of work, some values are not. Here is an example of when it fails. I managed queries using SDO_NN, if something needs work...

    How can I get for appearing on this (very new to space) question? Work on operating system Windows 7 Prof

    Select p.building_polygon
    spat.building p, spat.firebuilding f
    where p.building_name = f.building_on_fire and
    SDO_RELATE (p.building_polygon,
    SDO_GEOMETRY (2003, NULL, NULL, SDO_ELEM_INFO_ARRAY (1,1003,1))
    SDO_ORDINATE_ARRAY (768,278,477,504,155,115)), 'mask = ANYINTERACT') = 'TRUE '.
    *
    Error on line 0
    ORA-29902: error in executing ODCIIndexStart() routine
    ORA-13200: internal error [WINDOW_OBJECT] in spatial indexing.
    ORA-13220: failed to compare the tile with the geometry
    ORA-06512: at the 'MDSYS. SDO_INDEX_METHOD_10I', line 333

    The script that is used to create objects:
    create user spat identified by spat;
    grant all privileges to spit;

    Conn spat/spat;
    ALTER session set current_schema = seed;
    TOGETHER TO DEFINE

    CREATE TABLE spit. BUILDING
    (
    BUILDING_ID VARCHAR2 (3),
    BUILDING_NAME VARCHAR2 (50).
    VERTICES_COUNT INT,
    MDSYS BUILDING_POLYGON. SDO_GEOMETRY,
    CONSTRAINT BUILDING_PK PRIMARY KEY (BUILDING_ID)
    );

    CREATE TABLE spit. FIREHYDRANT
    (
    FIREHYDRANT_ID VARCHAR2 (3),
    MDSYS HYDRANT_POINT. SDO_GEOMETRY,
    CONSTRAINT FIREHYDRANT_PK PRIMARY KEY (FIREHYDRANT_ID)
    );

    CREATE TABLE spit. FIREBUILDING
    (
    BUILDING_ON_FIRE VARCHAR (50),
    CONSTRAINT FIREBUILDING_PK PRIMARY KEY (BUILDING_ON_FIRE)
    );

    INSERT IN USER_SDO_GEOM_METADATA
    VALUES ('CONSTRUCTION', 'BUILDING_POLYGON',
    SDO_DIM_ARRAY (SDO_DIM_ELEMENT ('X', 0, 820, 0.005),
    SDO_DIM_ELEMENT ('Y', 0, 580, 0.005)), NULL);

    INSERT IN USER_SDO_GEOM_METADATA
    VALUES ('FIREHYDRANT', 'HYDRANT_POINT',
    SDO_DIM_ARRAY (SDO_DIM_ELEMENT ('X', 0, 820, 0.005),
    SDO_DIM_ELEMENT ('Y', 0, 580, 0.005)), NULL);

    COMMIT;

    CREATE classic INDEX. BUILDING_SPATIAL_IDX
    THE spat. BUILDING (BUILDING_POLYGON)
    INDEXTYPE IS MDSYS. SPATIAL_INDEX;

    CREATE classic INDEX. FIREHYDRANT_SPATIAL_IDX
    THE spat. FIREHYDRANT (HYDRANT_POINT)
    INDEXTYPE IS MDSYS. SPATIAL_INDEX;

    COMMIT;

    ==================UPDATE==========================
    OK, I noticed something interesting. If I have 3 points in my table ordered, errors are thrown. If I have more than 3 points in my table ordered, it works. Could someone explain why this is and if there is a way around it?

    Select p.building_polygon
    spat.building p, elkordy.firebuilding f
    where p.building_name = f.building_on_fire
    and SDO_ANYINTERACT (p.building_polygon
    , SDO_GEOMETRY (2003, NULL, NULL, SDO_ELEM_INFO_ARRAY (1,1003,1))
    ((, - SDO_ORDINATE_ARRAY (232,91,149,226,277,198))) = "TRUE"; -USE ONLY ONE
    ((, - SDO_ORDINATE_ARRAY (165,84,168,484,769,534,743,108))) = "TRUE"; -USE ONLY ONE

    Published by: AmeerE on March 17, 2013 12:19 AM

    Ameer,

    You say that you are new to the space.

    The issue that you are facing is that the 3 vertices are not enough for a polygon. For Oracle Spatial, an outside edge of the polygon (1003) must have 4 peaks with the first being the last.

    So:

    select sdo_geom.validate_geometry(SDO_GEOMETRY(2003,NULL,NULL,SDO_ELEM_INFO_ARRAY(1,1003,1),SDO_ORDINATE_ARRAY(232,91,149,226,277,198)),0.05) as  from dual;
    VGEOM
    -----
    13343
    

    The Oracle error documentation;

    ORA-13343: less than four coordinates polygon geometry
    Cause: Specified geometry as a polygon, less than four coordinates in its definition.
    Action: A polygon must have at least four distinct coordinates. Correct the geometric definition or set the appropriate for this geometry SDO_GTYPE or SDO_ETYPE attribute.

    So, the solution is to repeat the first vertex:

    select sdo_geom.validate_geometry(SDO_GEOMETRY(2003,NULL,NULL,SDO_ELEM_INFO_ARRAY(1,1003,1),SDO_ORDINATE_ARRAY(232,91,149,226,277,198,232,91)),0.05) as geom from dual;
    VGEOM
    -----
    13367
    

    13357 is another error...

    ORA-13367: misdirection of the rings interiors/exteriors
    Cause: In an Oracle Spatial geometry, the outer and/or inner rings are not geared properly.
    Action: Make sure that the outer rings are oriented to the left and the inner rings are oriented in a clockwise direction.

    Note that Action tells you exactly the right command for the rings.

    This has been solved by reversing the coordinates as follows:

    select sdo_geom.validate_geometry(SDO_GEOMETRY(2003,NULL,NULL,SDO_ELEM_INFO_ARRAY(1,1003,1),SDO_ORDINATE_ARRAY(232,91,277,198,149,226,232,91)),0.05) as vgeom from dual;
    VGEOM
    -----
    TRUE
    

    It is now a geometry valid and will work in your sdo_anyinteract etc requests.

    Always make sure that your geometries times stored in the column of a table and provided to a request otherwise, are VALID.

    If this answers your query, please grant me the points that you think I deserve.

    concerning
    SImon

  • How to create spatial data from scratching

    Dear gurus,

    I am beginner in SI OBIEE, I tried to save the table space map (figure OBIEE_NAVTEQ).
    But I have no idea how do.

    I see the example:

    INSERT INTO (TABLE_NAME, COLUMN_NAME, DIMINFO, SRID) user_sdo_geom_metadata
    VALUES ("cola_markets", "geometry",
    SDO_DIM_ARRAY (-20 X 20 grid)
    SDO_DIM_ELEMENT ('X', 0, 20, 0.005),
    SDO_DIM_ELEMENT ('Y', 0, 20, 0.005)
    ),
    NULL VALUE
    );

    INSERT INTO cola_markets
    VALUES (2, 'cola_b', 200,)
    SDO_GEOMETRY (2003,-two-dimensional polygon)
    NULL,
    NULL,
    SDO_ELEM_INFO_ARRAY (1,1003,1),-a polygon (ring outside polygon)
    SDO_ORDINATE_ARRAY (5.1 8.1 8.6, 5.7, 5.1)
    )
    );

    ***

    -What is a SDO_DIM_ELEMENT?
    How to know the value of SDO_DIM_ELEMENT ('X', 0, 20, 0.005) of the card? y at - it a tool that could enable?
    -What different SDO_DIM_ELEMENT, SDO_ELEM_INFO_ARRAY and SDO_ORDINATE_ARRAY?
    How to set the SDO_ELEM_INFO_ARRAY and SDO_ORDINATE_ARRAY of the card?

    Any help really really appreciated

    Concerning

    JOE

    Joe,

    Try to use the GeoRaptor for SQL Developer extension. Download SQL Developer of RTO and then get GeoRaptor from Sourceforge.

    What is a SDO_DIM_ELEMENT?

    You logically implies that your example shows how do it manually using SQL.

    No hard and fast rule. Usually most of the people would determine the rectangular extent (or MBR) their data and enter the RADIUS X and Y, as determined by the coordinates lower left and upper right.

    For geodetic data (IE long/lat) more simply placed in the scope of the world full of-180, 180 and - 90.90. But others within the scope of their data. Read the documentation on that.

    How to know the value of SDO_DIM_ELEMENT ('X', 0, 20, 0.005) of the card? y at - it a tool that could enable?

    See above. Try any package of GIS, or GeoRaptor or

    select SDO_GEOM.SDO_MIN_MBR_ORDINATE(mbr,1) as minx,
           SDO_GEOM.SDO_MIN_MBR_ORDINATE(mbr,3) as maxx,
           SDO_GEOM.SDO_MIN_MBR_ORDINATE(mbr,2) as miny,
           SDO_GEOM.SDO_MIN_MBR_ORDINATE(mbr,4) as maxx
      from (select sdo_aggr_mbr(geom) as mbr
              from PLANNING_NEIGHBORHOODS);
    -- Result
    --
          MINX       MAXX       MINY       MAXX
    ---------- ---------- ---------- ----------
    5979385.646    6024741 2085840.482    2131294 
    

    Or...

    select 'SDO_DIM_ARRAY(' ||
           'SDO_DIM_ELEMENT(''X'','||
              SDO_GEOM.SDO_MIN_MBR_ORDINATE(mbr,1) || ',' ||
              SDO_GEOM.SDO_MIN_MBR_ORDINATE(mbr,3) || ',0.05' ||
        '),SDO_DIM_ELEMENT(''Y'',' ||
           SDO_GEOM.SDO_MIN_MBR_ORDINATE(mbr,2) || ',' ||
           SDO_GEOM.SDO_MIN_MBR_ORDINATE(mbr,4) || ',0.05))' as dimarray
      from (select sdo_aggr_mbr(geom) as mbr
              from PLANNING_NEIGHBORHOODS);
    -- Result
    --
    DIMARRAY
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    SDO_DIM_ARRAY(SDO_DIM_ELEMENT('X',5979385.6456569,6024740.99982789,0.05),SDO_DIM_ELEMENT('Y',2085840.48152296,2131294.0001958,0.05))
    

    The sdo_tolerance in the SDO_DIM_ELEMENT's your guess as to degree of accuracy of the data are. Reflect on how close two points are allowed to be before they are considered equal. 0.05 is 5cm (standard for long/lat data) and means two summits cannot be narrower than that otherwise you will get an error the summits in double (13356) during the validation of your data using sdo_geom.validate_geometry ().

    what different SDO_DIM_ELEMENT

    The metadata that describe the extent of your data. Written correct spatiali to user_sdo_geom_metadata is it necessary for indexing.

    SDO_ELEM_INFO_ARRAY and SDO_ORDINATE_ARRAY?

    objects that are used to describe a space object.

    How to set the SDO_ELEM_INFO_ARRAY and SDO_ORDINATE_ARRAY of the card?

    I don't think that it is the starting point to reinvent the wheel by trying to explain what is well explained in the Oracle documentation.

    Therefore, I suggest that you read Chapter 1 spatial Concepts (http://docs.oracle.com/cd/E11882_01/appdev.112/e11830/sdo_intro.htm#i884907) and then come back and ask us questions.

    concerning
    Simon

    Published by: Simon Greener on March 13, 2013 17:23

  • index create failed

    Hi, index create failed when I try to create spatial index in sql developer space tools... suggestions?



    To perform the requested operation, an error has occurred:

    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-13200: internal error [ROWID:AAAYTyAAEAAABFbAAA] in spatial indexing.
    ORA-13206: [] internal error creating the spatial index
    ORA-13364: dimensionality layer does not match the size of the geometry
    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.
    Code provider 29855

    Your example works for me:

    DROP TABLE sdo_test;
    
    CREATE TABLE sdo_test (
      nr      NUMBER,
      GEOM    MDSYS.SDO_GEOMETRY);
    
    COMMIT;
    
    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)));
    
    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)));
    
    INSERT INTO sdo_test VALUES (3,
      SDO_GEOMETRY(3302, 8307, NULL, SDO_ELEM_INFO_ARRAY(1, 2, 1),
        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); 
    
    CREATE INDEX sdo_test_geom_spix
              ON sdo_test(geom)
       INDEXTYPE IS MDSYS.SPATIAL_INDEX
    PARAMETERS('sdo_indx_dims=2');
    
    SELECT nr, SDO_GEOM.VALIDATE_GEOMETRY(geom,0.001) val, sdo_geom.sdo_length(geom,0.001) len
      FROM sdo_test;    
    
    nr      val    len
    -----------------------------------
    1     TRUE     54,8504621993542
    2     TRUE     51,4503307056062
    3     TRUE     60,978989198583
     
    
  • CHANGE SRID to VALIDATE how does this impact exististing object

    Hi all

    I have a complete database of geometry SDO objects that satisfies the test VALIDATE_GEOMETRY in the database 10g using SRID 8307, but the SRID 8307 would not pass on the Instance of 11 g. We are curious to know if we update all these objects SRID, if we were to make changes through our application and go through the routine VALIDATE_GEOMETRY if the point is already stored.

    Thank you

    VB

    VB,

    The SRID in USER_SDO_GEOM_METADATA table must match the SRID for records in your data table. If this isn't the case, then your VALIDATE_WITH_CONTEXT will throw an error ORA-13365.

    Kind regards.

    Ivan

  • The simple geometry Gets the error ORA-29532 on all calls SDO_GEOM

    Hi all

    I have a single point in a table in such a way that the query:
    select SDO_GEOM.VALIDATE_GEOMETRY(geomObj, 0.05) from testvalid;
    /* Returns */
    SDO_GEOM.VALIDATE_GEOMETRY(GEOMOBJ,0.05)
    'TRUE'
    However the query:
    select SDO_GEOM.VALIDATE_GEOMETRY_with_context(geomObj, 0.05) from testvalid;
    Receives the following error message:
    ORA-29532: Java call terminated by uncaught Java exception: java.lang.NumberFormatException: empty String
    ORA-06512: at "MDSYS.SDO_3GL", line 658
    ORA-06512: at "MDSYS.SDO_GEOM", line 519
    ORA-06512: at "MDSYS.SDO_GEOM", line 558
    ORA-06512: at line 1
    The data itself are a unique SDO_POINT_TYPE:
    select GEOMOBJ from testvalid;
    /* Returns: */
    GEOMOBJ
    '(3001, , (174.092329032787, 129.420551704918, -71.2857142857142), , )'
    I think the problem is something to do with the accuracy of the stored X, Y and Z values in point because if I'm running the following:
    update TESTVALID set GEOMOBJ.sdo_point.x = cast(GEOMOBJ.sdo_point.x as number(8,3));
    select SDO_GEOM.VALIDATE_GEOMETRY_with_context(geomObj, 0.05) from testvalid;
    /* Returns: */
    SDO_GEOM.VALIDATE_GEOMETRY_WITH_CONTEXT(GEOMOBJ,0.05)
    'TRUE'
    Similarly, running a direct comparison of an object made in the textual representation of the point fly works fine:
    select SDO_GEOM.VALIDATE_GEOMETRY_with_context("MDSYS"."SDO_GEOMETRY"(3001,NULL, "MDSYS"."SDO_POINT_TYPE"(174.092329032787,129.420551704918,-71.2857142857142),NULL,NULL), 0.005) from dual;
    /* Returns */
    SDO_GEOM.VALIDATE_GEOMETRY_WITH_CONTEXT("MDSYS"."SDO_GEOMETRY"(3001,NULL,"MDSYS"."SDO_POINT_TYPE"(174.092329032787,129.420551704918,-71.2857142857142),NULL,NULL),0.005)
    'TRUE'
    Note that I only noticed this problem after upgrade to v11 v11 R2. In addition, the same error ORA-29532 happens when executing calls SDO_GEOM. [x] function such as SDO_GEOM. DISTANCE(). The problem is not limited to the geometries of type SDO_POINT_TYPE, but the problem only happens on some geometry entries in my database. It is reproducible in that the same geometry will continue to fail and the only solution I found is to try to round up its precision in x, y or z. I don't know how to round the precision for the types of SDO_POINT_TYPE easily, so one of my problems is that I find myself with a any dispersion of other geometries that I can query is no longer in space.

    The data itself was inserted from MATLAB (which connects using drivers of ODBC Oracle Java v11) which converts my details in Java.Math.BigDecimal and binds to a prepared statement oracle.
    It is possible that I consider that the insertion is made from different computers, some of which are 64-bit computers. Maybe somehow these machines are pumping in too large of a precision coordinates for the geometry of the oracle?

    Any help would be great I am quite lost here.
    If the precision is indeed the problem, anyone know how can I cut these surplus values after the decimal point for all types of geometry?


    Thank you
    Sven.

    It is only related to the version of the server.
    So once the database is 11.2, that corruption won't happen.

  • result of the validation of a linestring with Oracle 10.2.0.4

    Hello

    I have a question.

    I was told that:

    "in 10.2.0.4, Oracle allows more compound linestrings or polygons composed with a subelement. To compound things, there must be at least 2 elements (at least an arcstring and a line right linestring). »

    But in the next test, there is that only arcstring, that is why, the following should invalidate in Oracle 10.2.0.4
    select SDO_GEOM.VALIDATE_GEOMETRY(SDO_GEOMETRY(3002, NULL, NULL, SDO_ELEM_INFO_ARRAY(1, 4, 1, 1, 2, 2), SDO_ORDINATE_ARRAY (1271333.86, 519747.853, 0, 1271313.26, 519729.981, 0, 1271302.94, 519704.74, 0)), 0.0005) as valid  FROM dual;
    I tested with Oracle 10.2.0.4 on:
    --32 - bit Windows 2003 R2
    --64 - bit Solaris 10
    -64-bit AIX 5.3

    Validation above all return true. (also true for Oracle 11.1.0.6.0 on 32-bit Windows 2003 R2).

    Did I miss something?

    Thank you!

    Published by: Modeler on June 16, 2009 13:19

    This change was not in 10.2.0.4 patches, but this game is part of a unique patch for bug 7261968 on top of 10.2.0.4.
    So, be in 10.2.0.5 and GR 11, 2 also good.

    Siva

Maybe you are looking for