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!

point-in-polygon query with SDO_GEOMETRY.RELATE

40269Oct 23 2001
Hello All,

I'm trying to perform a simple point-in-polygon query using
SDO_GEOMETRY.RELATE. Only the "anyinteract" mask seems to return
the correct answer. Can someone point out what I'm doing wrong
and/or suggest a better way to do this. My objective is simply
to return a count of the number of features in the point table
that fall with the selected feature in the polygon table.

select count(*) count from pnttest pnt, polytest poly,
user_sdo_geom_metadata m where SDO_GEOM.RELATE(pnt.shape,
m.diminfo, 'anyinteract',poly.shape,m.diminfo) = 'TRUE'
and m.table_name = 'POLYTEST' and m.column_name = 'SHAPE' and
poly.ADMIN_NAME = 'California'

I would have thought the "inside" mask would be what I want but
it returns 0 instead of the correct answer of 6.

Thanks for any help or suggestions!

-- john


Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 23 2001
Added on Oct 23 2001
2 comments
462 views