Boost C++ Libraries: Ticket #8393: polygon model doesn't adhere to stated Polygon concept rules. https://svn.boost.org/trac10/ticket/8393 <p> In the rules section for the Polygon concept it states that:<br /> </p> <p> "If the polygons underlying ring_type is defined as clockwise, the exterior ring must have the clockwise orientation, and any interior ring must be counter clockwise. If the ring_type is defined counter clockwise, it is vice versa."<br /> </p> <p> However, it would appear that the supplied polygon model does not adhere to this rule, since the same type is used for inner and outer rings. From the source: (<a class="ext-link" href="http://svn.boost.org/svn/boost/trunk/boost/geometry/geometries/polygon.hpp"><span class="icon">​</span>http://svn.boost.org/svn/boost/trunk/boost/geometry/geometries/polygon.hpp</a>) <br /> </p> <pre class="wiki"> bool ClockWise = true, ... template&lt;typename, typename&gt; class RingList = std::vector, ... typedef ring&lt;Point, ClockWise, Closed, PointList, PointAlloc&gt; ring_type; typedef RingList&lt;ring_type , RingAlloc&lt;ring_type &gt; &gt; inner_container_type; inline ring_type const&amp; outer() const { return m_outer; } inline inner_container_type const&amp; inners() const { return m_inners; } </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/8393 Trac 1.4.3 Barend Gehrels Sun, 07 Apr 2013 15:26:42 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/8393#comment:1 https://svn.boost.org/trac10/ticket/8393#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> We will rephrase the docs. It should be intepreted as following: </p> <p> "If the polygons underlying ring_type is defined as clockwise, the exterior ring must have the clockwise orientation, and any interior ring must be reversed w.r.t. the defined orientation" </p> <p> So both are compile-time defined as clockwise, the outer polygon follows the defined orientation, the inner is contrary to the defined orientation. </p> Ticket bmccart@… Mon, 08 Apr 2013 14:41:52 GMT <link>https://svn.boost.org/trac10/ticket/8393#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8393#comment:2</guid> <description> <p> That is a rewording, but that doesn't change the meaning, so unless you plan to make a code change to the polygon model class template it still won't match the part in quotes above. Yes, both are compile-time defined as clockwise, which doesn't match the meaning of the the inner rings having reversed orientation to the outer ring (whatever that orientation happens to be.) </p> </description> <category>Ticket</category> </item> </channel> </rss>