point-in-polygon query with SDO_GEOMETRY.RELATE
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