[Boost-bugs] [Boost C++ Libraries] #13494: polygon intersection fails

Subject: [Boost-bugs] [Boost C++ Libraries] #13494: polygon intersection fails
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2018-03-27 13:21:11


#13494: polygon intersection fails
-----------------------------------+----------------------------
 Reporter: lehnert@… | Owner: Barend Gehrels
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: geometry
  Version: Boost 1.66.0 | Severity: Showstopper
 Keywords: geometry intersection |
-----------------------------------+----------------------------
 Hello,

 executing the following polygon intersection produces an empty result
 although the second operand is completely inside the first.

 Code snippet:
     using point_type = boost::geometry::model::d2::point_xy<double>;
     using polygon = boost::geometry::model::polygon<point_type>;
     using multi_polygon = boost::geometry::model::multi_polygon<polygon>;

     polygon op1, op2;
     multi_polygon result;

     boost::geometry::read_wkt("POLYGON((-1.99900000000000011
 -0.889961757413527343,-1.99900000000000011
 -1.12178395051169733,-1.89792526415373097
 -1.49900000000000011,-1.8358086947169705
 -1.49900000000000011,-1.99900000000000011 -0.889961757413527343))", op1);
     boost::geometry::read_wkt("POLYGON((-1.97591538973459313
 -1.20793688888334905,-1.92415157993614439
 -1.40112205701807624,-1.8661960316547388
 -1.38559291465704759,-1.91795984145318754
 -1.19240774652231996,-1.97591538973459313 -1.20793688888334905))", op2);
     boost::geometry::intersection(op1, op2, result);

 I could track down the problem to the intersection/touch part.
 We use the intersection code quite heavily and such a constellation can
 occur frequently in our application. (I could present several more sample
 data for this bug). Therefore I set this to showstopper.
 Also I found other entries which look quite similar.

-- 
Ticket URL: <https://svn.boost.org/trac10/ticket/13494>
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-03-27 13:28:00 UTC