On 20-6-2013 18:30, TONGARI wrote:
2013/6/21 Barend Gehrels <barend@xs4all.nl>

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:


Yah, I somewhat missed that page, seems it does contain the info I needed.
Since I'm writing my 2d graphics lib, I always think the lib should close it anyway for drawing, but I don't know how it matters in the context of geometry operations...

Sure, basically every algorithm  needs polygons to be closed. Therefore we have the closeable_view which closes them automatically. Likewise we have the reversible_view which walks through the points in opposite direction, if the rings are counter clockwise. So basically (in a system where x is going up) we consider, internally, with help of these two views, all polygons as closed and clockwise.

Regards, Barend