Boost logo

Boost Users :

Subject: [Boost-users] [Polygon] Multiple Holes
From: Bagnall, Bryan D CIV SPAWARSYSCEN-PACIFIC, 56220 (bryan.bagnall_at_[hidden])
Date: 2012-05-03 21:20:06


Hello,

I'm trying to use Boost::polygon to do Boolean operations in my project. My
project uses contours that I'm grabbing with OpenCV, processing with
Boost::polygon, then writing out to an ESRI shapefile. OpenCV can give me a
list of contours within contours within contours...etc, and shapefiles can
be written out this way (see link for picture
http://icode-mda.googlecode.com/svn/trunk/examples/09_KMLshp/shapefilesWithH
oles/results/blobsWithHoles.png )

I haven't been able to jam all of the data in a single
polygon_with_holes_data polygon. Is it true that
boost::polygon::polygon_with_holes_data can only have an exterior contour
and multiple holes, but no contours inside of the hole? In other words,
could a single boost polygon support a continent with a lake, with an
island, with a pond, with a small island... ? Is there another type that
would support this? Maybe the Geometry library?

My current work around is to have (1)the continent with a lake as one
polygon, (2)the island with a pond as another,(3)the small island as
another...

Thanks,
Bryan




Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net