[postgis-users] Possible topology bug
pcreso at pcreso.com
pcreso at pcreso.com
Tue Apr 16 17:05:09 PDT 2013
Hi,
I'm trying to determine all the possible intersections in sets of polygons.
The approach I'm using is to load each set of polygon perimeters into a Postgis topology & extract all the faces as geometries. This results in some new polygons lying between the input ones. Which is the nature of this technique- that is not the problem.
I then determine the number of original polygons that the new ones overlap, which should go from 0 up. My problem arises in that I'm getting new polygons, derived from the boundaries of the old ones, which are actually between old polygons, but have a non-zero (but very small - like 1e-15) area of overlap - but all they have in common is the boundary line which should have a zero area.
So some of my new polygons supposedly overlap an old polygon, but in fact they do (or should) not.
My solution at the moment is to reject (treat as a zero area) any overlaps < 1e-15 in area, so the number of overlaps represents the "real" data. It works for my purposes, but is not ideal.
Is this a bug? An inevitable result with near zero values & finite precision?
Is there a better way of dealing with this issue?
Thanks,
Brent Wood
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20130416/46ade1b3/attachment.html>
More information about the postgis-users
mailing list