
Hi Diederick, Diederick C. Niehorster wrote:
This seems to be talking about the polygons themselves, not specifically the polygon set, and i find it worrying. I would need to use polygons defined by floating point vertices and I do not want them to be rounded or truncated to integers. For now, I only need to test if a point is inside the given polygon. Is this robust for points and polygon-vertices that do not lay on an integer grid?
I've done a benchmark including point-in-polygon test and I think you can use the proposed Boost.Polygon library for this. It supports also floating point polygons and the point-in-polygon operation, and as far as I know (but Luke knows the details) there is no truncation to integer for this purpose. Alternatively, you might have a look to the Generic Geometry Library which will be soon proposed to Boost (it has been in preview 4 times). See http://trac.osgeo.org/ggl/ where also references to documentation and SVN access are mentioned. Regards, Barend Gehrels