Modify

Ticket #11899 (closed Bugs: fixed)

Opened 17 months ago

Last modified 7 weeks ago

boost::geometry::equals doesn't handle open polygons

Reported by: Bruno Deligny <bruno.deligny@…> Owned by: awulkiew
Milestone: Boost 1.64.0 Component: geometry
Version: Boost 1.60.0 Severity: Problem
Keywords: polygon ring equals Cc:

Description

That doesn't works:

typedef boost::geometry::model::d2::point_xy<int> P;
boost::geometry::model::polygon<P, false, false> polygon1, polygon2;

boost::geometry::append(polygon1, boost::make_tuple(-18,1));
boost::geometry::append(polygon1, boost::make_tuple(-23,1));
boost::geometry::append(polygon1, boost::make_tuple(-23,-3));
boost::geometry::append(polygon1, boost::make_tuple(-18,-3));

boost::geometry::append(polygon2, boost::make_tuple(-23,1));
boost::geometry::append(polygon2, boost::make_tuple(-23,-3));
boost::geometry::append(polygon2, boost::make_tuple(-18,-3));
boost::geometry::append(polygon2, boost::make_tuple(-18,1));

assert(boost::geometry::equals(polygon1, polygon2) == true);

But this works:

typedef boost::geometry::model::d2::point_xy<int> P;
boost::geometry::model::polygon<P, false, true> polygon1, polygon2;

boost::geometry::append(polygon1, boost::make_tuple(-18,1));
boost::geometry::append(polygon1, boost::make_tuple(-23,1));
boost::geometry::append(polygon1, boost::make_tuple(-23,-3));
boost::geometry::append(polygon1, boost::make_tuple(-18,-3));
boost::geometry::append(polygon1, boost::make_tuple(-18,1));

boost::geometry::append(polygon2, boost::make_tuple(-23,1));
boost::geometry::append(polygon2, boost::make_tuple(-23,-3));
boost::geometry::append(polygon2, boost::make_tuple(-18,-3));
boost::geometry::append(polygon2, boost::make_tuple(-18,1));
boost::geometry::append(polygon2, boost::make_tuple(-23,1));

assert(boost::geometry::equals(polygon1, polygon2) == true);

Attachments

Change History

comment:1 Changed 7 weeks ago by awulkiew

  • Status changed from new to closed
  • Resolution set to fixed
  • Component changed from polygon to geometry
  • Milestone changed from To Be Determined to Boost 1.64.0

comment:2 Changed 7 weeks ago by awulkiew

  • Status changed from closed to reopened
  • Resolution fixed deleted

comment:3 Changed 7 weeks ago by awulkiew

  • Owner changed from ljsimons to awulkiew
  • Status changed from reopened to new

comment:4 Changed 7 weeks ago by awulkiew

  • Status changed from new to closed
  • Resolution set to fixed
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.