SELECT a.parcel_id AS parcel_id_a,
b.parcel_id AS parcel_id_b,
(ST_CollectionExtract(ST_Intersection(a.geom, b.geom), 3)) AS geom
FROM sample.heather_farms AS a,
sample.heather_farms AS b
WHERE a.gid < b.gid
AND ST_Overlaps(a.geom, b.geom);
This will return pairwise overlaps between parcels by selecting the two parcel IDs and their overlapping geometry, which can be inspected in QGIS.
Unfortunately, there are many small, sliver overlaps in typical data which need to be dealt with. I tried preprocessing with ST_SnapToGrid (to deliberately lose negligible precision), but that sometimes invalidates the geometries with self intersections (can be fixed with ST_MakeValid) and causes "jumps" in diagonal boundaries.
Example SQL command:
This will return pairwise overlaps between parcels by selecting the two parcel IDs and their overlapping geometry, which can be inspected in QGIS.
Unfortunately, there are many small, sliver overlaps in typical data which need to be dealt with. I tried preprocessing with
ST_SnapToGrid
(to deliberately lose negligible precision), but that sometimes invalidates the geometries with self intersections (can be fixed withST_MakeValid
) and causes "jumps" in diagonal boundaries.