Opened 7 years ago
Closed 6 years ago
#11899 closed Bugs (fixed)
boost::geometry::equals doesn't handle open polygons
Reported by: | 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);
Change History (4)
comment:1 by , 6 years ago
Component: | polygon → geometry |
---|---|
Milestone: | To Be Determined → Boost 1.64.0 |
Resolution: | → fixed |
Status: | new → closed |
comment:2 by , 6 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
comment:3 by , 6 years ago
Owner: | changed from | to
---|---|
Status: | reopened → new |
comment:4 by , 6 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Thanks!
Fix (the second one is for another but related issue):