Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ST_ISVALID reason for invalid?

InfoDocJul 31 2017 — edited Jul 31 2017

I have a table with SDO_GEOMETRIES which return 0 instead of 1 from ST_ISVALID.

I would like to have a systemaatic way to find out WHY a particular geometry is invalid.

I found this :

https://docs.oracle.com/database/121/SPATL/sdo_geom-validate_geometry_with_context.htm#SPATL1130

SDO_GEOM.VALIDATE_GEOMETRY_WITH_CONTEXT(geo, 0.005)

--If you receive a geometry validation error such as 13356 (adjacent points in a geometry are redundant),

so call the SDO_UTIL.GETVERTICES, specifying a rownum stopping condition

           to include the coordinate one greater

           than the coordinate indicated with the error.

The last two coordinates shown in the output are the redundant coordinates.

These coordinates may be exactly the same, or they may be within the user-specified tolerance and thus are considered the same point.

To remove redundant coordinates use: SDO_UTIL.REMOVE_DUPLICATE_VERTICES

I also saw this:

https://docs.oracle.com/database/121/SPATL/sdo_util-rectify_geometry.htm#SPATL1243

SDO_UTIL.RECTIFY_GEOMETRY(     geometry  IN SDO_GEOMETRY,      tolerance IN NUMBER      ) RETURN SDO_GEOMETRY;

Fixes these problems with the input geometry:

  • Duplicate vertices
  • Polygon boundary intersecting itself
  • Incorrect orientation of polygon exterior or interior rings (or both)

are there other functions I should know to determine WHY an SDO_GEOMETRY is invalid?

This post has been answered by [Deleted User] on Jul 31 2017
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 28 2017
Added on Jul 31 2017
2 comments
2,579 views