i am currently struggling with the process of subtracting
small polygons from a larger polygon. None of the polygons have holes
and all small polygones are completely covered by the larger polygone.
Of course, the result will be a polygon with holes.
I first tried
with boost 1.48, but as this resulted in compilation errors i now
upgradet to 1.54 as i read in the release notes of 1.54:
> support for line/polygon intersections and differences.
My code looks like this:
typedef boost::geometry::model::d2::point_xy<double> boost_pnt;
typedef boost::geometry::model::polygon<boost_pnt> boost_poly;
boost_poly outputPoly = outerPolygon;
boost_poly innerPoly = ...;
boost::geometry::difference(outputPoly, innerPoly, new_output);
outputPoly = new_output;
Compiling thjs with VC2010 results in the line of difference
error C2039: 'type' : is not a member of
So my understanding is, that difference() does not work with all parameters of type polygon.
using std::vector<boost_poly> as last parameter, difference
compiles and works, but i see no way of converting this back to a
I can not find a way to to distance in a loop.
Is there some way to solve this problem?