4

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

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

 ?column? 
----------
 t
(1 row)

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

2 Answers 2

5

http://postgis.net/docs/ST_Equals.html

select ST_Equals('0101000020E6100000C5BCD8C5FEF45DC0AFE29EF87B584740'::geometry
,'0101000020E61000005A7CAFC6FEF45DC01A23C8F77B584740'::geometry)

Returns False.

5

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 agree to our terms of service and acknowledge you have read our privacy policy.

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