I want to ensure that the result of a ST_Intersection(polygon1, polygon2)
is also a polygon. I initially started by filtering with a ST_Overlaps(polygon1, polygon2)
but that seems to only ensure that both features intersect while neither feature contains the other.
Besides filtering by checking the result of the intersection operation e.g. ST_Dimension(ST_Intersection(polygon1, polygon2)) > 1
is there a way to filter polygons by ensuring that they share some internal space that is not a boundary?
ST_Crosses(polygon1, polygon2)
actually does perform the filtering that I want.
WHERE
clause where you check the resulting area is greater than 0? – djq Dec 23 '14 at 1:31a overlaps b, they have some but not all points in common, they have the same dimension, and the intersection of the interiors of the two geometries has the same dimension as the geometries themselves.
You may want to add Equals if the two polygons can be identical. – user30184 Dec 23 '14 at 10:37