I have two different geometries (albeit very closeby) that Postgres is treating as equal.

db=> select '0101000020E6100000C5BCD8C5FEF45DC0AFE29EF87B584740'::geometry = '0101000020E61000005A7CAFC6FEF45DC01A23C8F77B584740'::geometry;

(1 row)

Can I dial-up PostGIS equality resolution so that these are unequal?



select ST_Equals('0101000020E6100000C5BCD8C5FEF45DC0AFE29EF87B584740'::geometry

Returns False.


PostGIS defines the = operator to test bounding-box equality rather than geometry equality (see docs).

There have been discussions of changing this behavior, but I'm not aware of anything in the works. (Refer to https://lists.osgeo.org/pipermail/postgis-devel/2016-April/025769.html for a recent discussion.)

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.