This content has been marked as final.
Show 4 replies

1. Re: How to resolve VALIDATE_GEOMETRY_WITH_CONTEXT 'errors'?
Luiz Soares Apr 30, 2007 6:46 AM (in response to 555803)Hi,
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 selfintersecting polygons. (The Open Geospatial Consortium simple features specification does not allow a
polygon to selfintersect.) In such cases, Oracle reports error 13349 (polygon
boundary crosses itself), including the Element, Ring, and Edge numbers where
selfintersection occurs.
Hope it helps,
Luiz 
2. Re: How to resolve VALIDATE_GEOMETRY_WITH_CONTEXT 'errors'?
John O'Toole Apr 30, 2007 7:27 AM (in response to 555803)Try running SDO_MIGRATE.TO_CURRENT  that should get rid of your ORA13367 errors.
http://downloaduk.oracle.com/docs/html/B14255_01/sdo_objmigr.htm#sthref2154
ORA13348 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. 
3. Re: How to resolve VALIDATE_GEOMETRY_WITH_CONTEXT 'errors'?
bkazar Apr 30, 2007 9:14 AM (in response to 555803)Hi,
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.
best regards,
baris 
4. Re: How to resolve VALIDATE_GEOMETRY_WITH_CONTEXT 'errors'?
510467 May 1, 2007 12:42 PM (in response to 555803)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.
Kind regards,
Dan