I have a situation where I need to find out if a geometry being imported into a postGIS 2.1 database matches one drawn previously (i.e we want to know if the imported geometry is less up-to-date than the existing one).
I thought I could use st_equals for this, but it isn't working as expected.
This is the code I am using to find if the new geometry exists:
SELECT id FROM "GeomArchive" WHERE ST_Equals(geom, ST_GeometryFromText(wkt,4326));
however, it always returns false even when I pass in a geometry extracted from the "GeomArchive" table.
I saw this question, but the solution didn't help.
I find "=" works, which seems to make it unlikely that the problem is with rounding, since I would have expected a false result with this as well.
I'm not sure what "=" compares. Something I read in the pg documentation seemed to indicate that it actually only compares bounding boxes.
Why is st_equals not working in this situation?