Boost logo

Geometry :

Subject: Re: [geometry] Why closure?
From: Barend Gehrels (barend_at_[hidden])
Date: 2013-06-20 12:00:22


Hi,

On 20-6-2013 11:26, TONGARI wrote:
>
> I'm not quite understand why we need traits::closure for Ring &
> Polygon, aren't these always closed?
> What should I expect if the closure is open? Should I see Ring as
> Linestring then?

No (about the last question).

Apparently the doc about closure should be updated. However, this page
explains it clearly:

http://www.boost.org/doc/libs/1_53_0/libs/geometry/doc/html/geometry/reference/enumerations/closure_selector.html

So we support "open" and "closed" polygon/rings. For a triangle, an open
polygon/ring contains 3 points, the 3 points of the triangle. For a
closed polygon/ring, it contains 4 points, where the last point should
be identical to the first point.

Regards, Barend


Geometry list run by mateusz at loskot.net