Boost logo

Boost Users :

Subject: [Boost-users] Boost.Geometry: Correct use of multi-part polygons
From: John Lilley (john.lilley_at_[hidden])
Date: 2013-02-20 10:29:53


Greetings, I am looking for some guidance around the correct creation and use of multi-part polygons. I am a bit confused about when to use each of the following:

* Polygon with multiple rings

* Vector of polygons

* Polygon set

* Set/vector of polygons, each potentially containing multiple rings

I gather from this example picture:

http://geometrylibrary.geodan.nl/03__polygon__example_8cpp-example.html

That if one wants holes to be opened as a result of intersection, they need to be rings as opposed to polygon sets or vectors of polygons?

An example would be polygon(s) representing an island chain. Some of the islands are atolls and as such have a hole in the middle. What would a representation of this set of islands look like?

And, what If I don't know if I have "real" rings (interior) vs just a collection of polygons (like I got this from an external source that doesn't have the same model). If I just throw a pile of points at a polygon and call clean(), will that magic everything up for me?

john



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