This content has been marked as final. Show 4 replies
You need to correct those geometries.
I've got this from Oracle Spatial 10g User's Guide:
Rings: A ring is only used with polygon elements. Exterior rings in a polygon are
considered polygon elements, and an exterior ring can include zero or more
interior rings (or holes). Each interior ring has its own ring designation, but Ring 1
is associated with the exterior polygon itself. For example, Element 1, Ring 1 refers to the first exterior polygon in a geometry; Element 1, Ring 2 refers to the first interior polygon of the first exterior polygon; and Element 1, Ring 3 refers to the second interior polygon. If the geometry is a multipolygon, Element 2, Ring 1 is
used to refers to the second exterior polygon. If there are interior polygons
associated with it, Element 2, Ring 2 refers to the first interior polygon of the
second exterior polygon.
Edges: An edge refers to a line segment between two coordinates. Edge 1 refers to the segment between coordinate 1 and coordinate 2, Edge 2 refers to the line segment between coordinates 2 and 3, and so on. The most common place to see edge errors when validating geometries is with self-intersecting polygons. (The Open Geospatial Consortium simple features specification does not allow a
polygon to self-intersect.) In such cases, Oracle reports error 13349 (polygon
boundary crosses itself), including the Element, Ring, and Edge numbers where
Hope it helps,
Try running SDO_MIGRATE.TO_CURRENT - that should get rid of your ORA-13367 errors.
ORA-13348 means that the polygon boundary is not closed
Visually check the data - is the polygon boundary open? If there is a gap, then check the distance of it - you may have a tolerance issue.
13348 means: polygon boundary is not closed. Thus you need to make sure first vertex and last vertex are the same in your polygon defn.
13349 means polygon boundary crosses itself. You need to make sure no edges of the polygon intersect. In your case Edge# 5247 and Edge# 5252 intersect.
13367 means wrong orientation for interior/exterior rings. Thus, you need to make sure the exterior rings are oriented counterclockwise and the interior rings are oriented clockwise.
If you fix these, your geometry will be valid.
Please let us know if you have further questions.
After migrating the geometries you might want to try sdo_util.rectify_geometry.
It will do its best to fix broken geometries (sometimes it can, sometimes it can't).
I would not do a global update based on the results of rectify geometry. Instead I would look at the results to make sure the geometries looked correct before updating them in the database.