Boost logo

Boost Users :

Subject: Re: [Boost-users] Boost.Geometry: Correct use of multi-part polygons
From: Barend Gehrels (barend_at_[hidden])
Date: 2013-02-20 16:04:38


Hi John,

I realized I did not answer the first part explicitly:

On 20-2-2013 16:29, John Lilley wrote:
>
> 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
>

A polygon (in Boost.Geometry) can have one exterior ring, and zero or
mor interior rings. So multiple in the sense that there can be any
number of holes, but not more than one exterior ring. The exterior ring
should not be self intersecting.

There are multi_polygons. This is a collection (vector, set, deque,
whatever you call it) of polygons. They should not be mutually
intersecting though.

These are common used definitions, defined by OGC. Just found nice
descriptions by OpenStreetMap:
http://wiki.openstreetmap.org/wiki/Multipolygon

or see this page:
http://www.tankonyvtar.hu/hu/tartalom/tamop425/0027_SDO4/ch01s02.html

they explain it in more detail.

Regards, Barend



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