I'm trying to find overlapping polygons with ST_Overlaps
function. Everything works fine but there are cases when ST_Overlaps
returns TRUE
for adjacent polygons.
Example:
POLYGON((145053.95 167055.18,145054.85 167047.42,145058.81 167047.84,145059.07 167045.82,145059.91 167045.93,145060.01 167045.13,145062.05 167045.42,145074.27 167047.52,145061.74 167118.48,145060.33 167127.09,145034.52 167123.21,145031.66 167122.69,145032.15 167119.98,145022.81 167118.28,145028.33 167087.92,145048.3 167091.55,145049.01 167087.67,145053.95 167055.18))
POLYGON((145024.07 167111.35,145028.33 167087.92,145048.3 167091.55,145049.01 167087.67,145053.95 167055.18,145050.8 167054.73,145031.31 167067.47,145028.87 167084.01,145018.97 167082.72,145014.59 167109.69,145024.07 167111.35))
I tested this polygons with ST_Intersection
- result is a MULTILINESTRING
.
But as far as I understand if ST_Overlaps
returns TRUE
that means ST_Intersection
should return POLYGON
.
So the question - is this an issue with PostGIS or I just misunderstood the way ST_Overlaps
works.
PostGIS version: postgis 3.1 for docker (postgis/postgis image)
ST_Relate(a.geom, b.geom, '2*T***T**')
is falsey. If not then you may need toST_SnapToGrid
with a tiny tolerance, orST_QuantizeCoordinates
- anything, really, to reduce precision to guaranteed0
s, which may or may not help...