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!

Geometry collections (gtype 4) and validation rules

Paul DziemielaJan 18 2011 — edited Jan 18 2011
Hi folks,

I am not finding anywhere any particular rules about how a geometry collection should validate. What is the best reference (even outside Oracle Spatial)?
Below is a collection geometry of a single point and three polygons (some of which overlap each other). When I remove the point and test the three polygons as a multipolygon I get back a 13351 error as expected. But when wrapped up in a collection I get back TRUE. Are there really any rules for collections? Or does anything go?

In this use case the collection is the source data but then I pull out the polygons further down the road and - whammo - invalid geometries.
I see the same results on both 10gR2 and 11gR2.

Thanks!

Paul

Collection Geometry of one point with three overlapping polygons - validates TRUE
SELECT
SDO_GEOM.VALIDATE_GEOMETRY_WITH_CONTEXT(
   SDO_GEOMETRY(
      2004,
      8265,
      NULL,
      SDO_ELEM_INFO_ARRAY(
         1,
         1,
         1,
         3,
         1003,
         1,
         13,
         1003,
         1,
         23,
         1003,
         1
      ),
      SDO_ORDINATE_ARRAY(
         -84.3508498737178,
         45.9775103765449,
         -84.3522809373541,
         45.9723473947168,
         -84.3522938852715,
         45.9722956030474,
         -84.3522161977673,
         45.9722308634606,
         -84.3522032498499,
         45.9722697072127,
         -84.3522809373541,
         45.9723473947168,
         -84.3522809373541,
         45.9723473947168,
         -84.3522938852715,
         45.9722956030474,
         -84.3522161977673,
         45.9722308634606,
         -84.3522032498499,
         45.9722697072127,
         -84.3522809373541,
         45.9723473947168,
         -84.3522809373541,
         45.9723473947168,
         -84.3522938852715,
         45.9722956030474,
         -84.3522161977673,
         45.9722308634606,
         -84.3522032498499,
         45.9722697072127,
         -84.3522809373541,
         45.9723473947168
      )
   ),
   0.001
)
FROM
dual
Point removed making it 2007, now throws 13351 error
SELECT
SDO_GEOM.VALIDATE_GEOMETRY_WITH_CONTEXT(
   SDO_GEOMETRY(
      2007,
      8265,
      NULL,
      SDO_ELEM_INFO_ARRAY(
         1,
         1003,
         1,
         11,
         1003,
         1,
         21,
         1003,
         1
      ),
      SDO_ORDINATE_ARRAY(
         -84.3522809373541,
         45.9723473947168,
         -84.3522938852715,
         45.9722956030474,
         -84.3522161977673,
         45.9722308634606,
         -84.3522032498499,
         45.9722697072127,
         -84.3522809373541,
         45.9723473947168,
         -84.3522809373541,
         45.9723473947168,
         -84.3522938852715,
         45.9722956030474,
         -84.3522161977673,
         45.9722308634606,
         -84.3522032498499,
         45.9722697072127,
         -84.3522809373541,
         45.9723473947168,
         -84.3522809373541,
         45.9723473947168,
         -84.3522938852715,
         45.9722956030474,
         -84.3522161977673,
         45.9722308634606,
         -84.3522032498499,
         45.9722697072127,
         -84.3522809373541,
         45.9723473947168
      )
   ),
   0.001
)
FROM
dual
This post has been answered by Bkazar-Oracle on Jan 18 2011
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 15 2011
Added on Jan 18 2011
5 comments
436 views