
Geometry : 
Subject: Re: [geometry] Change boost polygon / ring orientation
From: Adam Wulkiewicz (adam.wulkiewicz_at_[hidden])
Date: 20130913 16:48:26
Hi,
Hunk wrote:
> Hello,
>
> i defined on my program that a polygon is CCW and holes inside the polygon
> are CW. But not i'm using boost for area calculation and clipping
> operatoren.
>
> My problem is that i use boost::geometry::correct everytime i use a boost
> algorithm.
>
> It is possible to tell boost that my polygon is CCW so i don't have to use
> correct?
>
> Or it's the better solution that i change my orientation?
If you're using boost::geometry::model::polygon and
boost::geometry::model::ring check out the template parameters:
http://www.boost.org/doc/libs/1_54_0/libs/geometry/doc/html/geometry/reference/models/model_polygon.html
http://www.boost.org/doc/libs/1_54_0/libs/geometry/doc/html/geometry/reference/models/model_ring.html
As you can see by default both polygons and rings are expected to be CW
and closed (the first point should be repeated at the end of the
container). Use template parameters which suits your needs.
Regards,
Adam
Geometry list run by mateusz at loskot.net