Modify

Ticket #8393 (closed Bugs: fixed)

Opened 13 months ago

Last modified 13 months ago

polygon model doesn't adhere to stated Polygon concept rules.

Reported by: bmccart@… Owned by: barendgehrels
Milestone: To Be Determined Component: geometry
Version: Boost 1.53.0 Severity: Problem
Keywords: polygon concept rule outer inner ring Cc:

Description

In the rules section for the Polygon concept it states that:

"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."

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: ( http://svn.boost.org/svn/boost/trunk/boost/geometry/geometries/polygon.hpp)

    bool ClockWise = true,
    ...
    template<typename, typename> class RingList = std::vector,
    ...
    typedef ring<Point, ClockWise, Closed, PointList, PointAlloc> ring_type;
    typedef RingList<ring_type , RingAlloc<ring_type > > inner_container_type;

    inline ring_type const& outer() const { return m_outer; }
    inline inner_container_type const& inners() const { return m_inners; }

Attachments

Change History

comment:1 Changed 13 months ago by barendgehrels

  • Status changed from new to closed
  • Resolution set to fixed

We will rephrase the docs. It should be intepreted as following:

"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"

So both are compile-time defined as clockwise, the outer polygon follows the defined orientation, the inner is contrary to the defined orientation.

comment:2 Changed 13 months ago by bmccart@…

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.)

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.