[Boost-bugs] [Boost C++ Libraries] #10803: union algorithm returning invalid geometry

Subject: [Boost-bugs] [Boost C++ Libraries] #10803: union algorithm returning invalid geometry
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-11-19 12:26:13


#10803: union algorithm returning invalid geometry
-------------------------------------------+---------------------------
 Reporter: Volker Schöch <vschoech@…> | Owner: barendgehrels
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: geometry
  Version: Boost 1.57.0 | Severity: Regression
 Keywords: union, multi-polygon, polygon |
-------------------------------------------+---------------------------
 My "_intPolygon" type is actually a multi-polygon, using a polygon type
 that is based on '''int''', oriented '''counter-clockwise''' and
 '''open''' (not closed). Please consider the following example:
 {{{
 _intPolygon polygonA;
 boost::geometry::read_wkt("MULTIPOLYGON(((3174 1374,3174 2886,1374
 2886,1374 2139,3174 1374)))", polygonA); // does not throw
 boost::geometry::correct(polygonA); // remove redundant closing point
 returned by wkt
 boost::geometry::is_valid(polygonA); // returns true

 _intPolygon polygonB;
 boost::geometry::read_wkt("MULTIPOLYGON(((1374 1092,1734 1092,3174
 2526,3174 2886,1374 2886,1374 1092)))", polygonB); // does not throw
 boost::geometry::correct(polygonB); // remove redundant closing point
 returned by wkt
 boost::geometry::is_valid(polygonB); // returns true

 _intPolygon polygonC;
 boost::geometry::union_(polygonA, polygonB, polygonC);
 // polygonC = MULTIPOLYGON(((1374 809,1374 1092,1734 1092,3529 1718,3174
 1374,3174 2526,3174 2886,1374 2886,1374 2139,1374 809)))
 boost::geometry::is_valid(polygonC); // returns FALSE

 boost::geometry::remove_spikes(polygonC);
 // polygonC = MULTIPOLYGON(((1374 1092,1734 1092,3529 1718,3174 1374,3174
 2526,3174 2886,1374 2886,1374 2139,1374 1092)))
 boost::geometry::is_valid(polygonC); // still returns FALSE
 }}}

 May be related to #10661.[[BR]]
 May be related to #9828.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/10803>
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:17 UTC