This content has been marked as final. Show 4 replies
I need to determine whether a polygon overlaps with another. Here polygon can be of shape circle, rectangle, postal code or polygon.
Overlap can be anything other than TOUCH, Can I use multiple masks as mentioned in below query?
SELECT COUNT(*) AS OVERLAP_COUNT
FROM M1_POLYGON a ,
WHERE ENTITY_KEY1 <> 'ZZSA2'
AND ENTITY_KEY1 IN
(SELECT DISTINCT SVC_AREA_CD
WHERE M1_SVC_TYPE_FLG = 'ZZSA'
WHERE a.M1_ENTITY_TYPE_FLG= 'M1SA'
AND a.ENTITY_KEY1 = 'ZZSA2'
AND SDO_RELATE(a.M1_POLYGON_GEOMETRY, b.M1_POLYGON_GEOMETRY,'mask=OVERLAPBDYINTERSECT+CONTAINS+COVERS+COVEREDBY+EQUAL') = 'TRUE'