[Boost-bugs] [Boost C++ Libraries] #13553: intersection gives wrong result

Subject: [Boost-bugs] [Boost C++ Libraries] #13553: intersection gives wrong result
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2018-04-30 14:04:02


#13553: intersection gives wrong result
------------------------------+----------------------------
 Reporter: marnix.berg@… | Owner: Barend Gehrels
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: geometry
  Version: Boost 1.66.0 | Severity: Problem
 Keywords: |
------------------------------+----------------------------
 The following polygons result in a wrong intersection:

 using point_type = boost::geometry::model::d2::point_xy<double>;
 typedef boost::geometry::model::ring<point_type, false, true> polygon;

 polygon op1, op2;

 boost::geometry::read_wkt("POLYGON((7.7058932076134967
 -11.523889618379748,8.0348094747518424
 0.63492733448631888,7.7720440433489850 0.63492733448631888,
 7.7058932076134967 -11.523889618379748))", op1);

 boost::geometry::read_wkt("POLYGON((2.6206910206017642
 -32.773696844382265, 5.5835888947200090 -24.273798818378602,
 6.7109368565951772 -20.023839227004206, 7.4191426214038723
 -15.773870150408516, 7.7058941612236938 -11.523876267001913,
 -3.1025600674348395 -11.523582486001384, -3.1025610210450365
 -32.773541282571529, 2.6206910206017642 -32.773696844382265))", op2);

 std::vector<polygon> result;
 boost::geometry::intersection(op1, op2, result);

 result is equal to op1, while op1 is mostly outside op2.

-- 
Ticket URL: <https://svn.boost.org/trac10/ticket/13553>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2018-04-30 14:12:05 UTC