I have two tables in Postgres, both of type geometry(MultiPolygon,27700) and I would like to find any that intersect with an area of more than 100 square metres.
I know how to get any that intersect above an arbitrary threshold:
SELECT *
FROM aTable a
JOIN bTable b
WHERE ST_Area(ST_Intersection(a.geom, b.geom)) > 1;
However, the area returned here is in (I think) decimal degrees. How can I ensure it is always more than 100 square metres?
Perhaps if I do something like:
WHERE ST_Area(ST_Transform(ST_Intersection(i.wkb_geometry, w.wkb_geometry), 3857)) > 100
that would work, since the unit of EPSG:3857 is metres?
I've read this and this but I don't know what projection to pick.
ERROR 1: ERROR: Only lon/lat coordinate systems are supported in geography.. Table a has geometry of typegeometry(Polygon,27700)and table b has geometry of typegeometry(MultiPolygon,27700). – Richard Jan 14 '18 at 03:06ST_Area(ST_Transform(ST_Intersection(a.geom, b.geom), 3857)::geography)-- nope, that gives the same error. – Richard Jan 14 '18 at 03:10