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?