Modify

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#8393 closed Bugs (fixed)

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

Reported by: bmccart@… Owned by: Barend Gehrels
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 (0)

Change History (2)

comment:1 Changed 4 years ago by Barend Gehrels

Resolution: fixed
Status: newclosed

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

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Barend Gehrels.
The resolution will be deleted.

Add Comment


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

 
Note: See TracTickets for help on using tickets.