Re: [Boost-bugs] [Boost C++ Libraries] #11676: difference algorithm returning invalid geometry

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #11676: difference algorithm returning invalid geometry
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-09-21 15:14:24


#11676: difference algorithm returning invalid geometry
--------------------------+------------------------------------------------
  Reporter: anonymous | Owner: barendgehrels
      Type: Bugs | Status: new
 Milestone: To Be | Component: geometry
  Determined | Severity: Problem
   Version: Boost | Keywords: difference, multi-polygon, polygon
  1.59.0 |
Resolution: |
--------------------------+------------------------------------------------

Comment (by vschoech@…):

 Here is another example:

 {{{
 tc::geo::polygon<int> polygonA;
 boost::geometry::read_wkt("MULTIPOLYGON(((2974 352,2940 336,2907 334,2907
 317,2974 317,2974 352)),((2940 354,2957 361,2907 361,2907 353,2940
 354)))", polygonA); // does not throw
 boost::geometry::is_valid(polygonA); // returns true

 tc::geo::polygon<int> polygonB;
 boost::geometry::read_wkt("MULTIPOLYGON(((576 330,576 312,777 348,576
 330)),((2968 349,2940 342,2902 334,2940 336,2968 349)),((3612 516,3276
 498,2968 349,3276 432,3612 444,3612 516)),((2902 334,2598 324,2262
 438,1926 414,1590 384,1248 354,1590 372,1926 384,2262 402,2598 276,2902
 334)),((1248 354,912 372,777 348,912 360,1248 354)))", polygonB); // does
 not throw
 boost::geometry::is_valid(polygonB); // returns true

 tc::geo::polygon<int> polygonC;
 boost::geometry::difference(polygonA, polygonB, polygonC); // does not
 throw
 // polygonC: MULTIPOLYGON(((2940 354,2957 361,2907 361,2907 353,2940
 354)),((2974 352,2968 349,2940 336,2907 334,2907 317,2974 317,2974
 351,2968 349,2974 352)))
 boost::geometry::is_valid(polygonC); // returns false!
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/11676#comment:2>
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 : 2017-02-16 18:50:19 UTC