[Boost-bugs] [Boost C++ Libraries] #10823: IsValid or dissolve problem?

Subject: [Boost-bugs] [Boost C++ Libraries] #10823: IsValid or dissolve problem?
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-11-27 20:20:40


#10823: IsValid or dissolve problem?
------------------------------+---------------------------
 Reporter: anonymous | Owner: barendgehrels
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: geometry
  Version: Boost 1.57.0 | Severity: Problem
 Keywords: |
------------------------------+---------------------------
 Dear Boost Geometry contributors.

 As always: Thanks for your great work. Your work is an incredible help
 every day.

 I discovered a problem, which I guess you can help me with.

 If you look at the below test case you will see a small polygon where two
 points touches each other and forms a "hole" in the polygon.

 If I call is_valid with this polygon it tells me that the polygon is
 invalid.

 If I then tries to dissolve it, the output is again not valid.

 My question is therefore if it could be a problem with is_valid or
 dissolve. Alternatively what could I do to make it valid so that it can be
 used for calls to e.g sym_difference?

 Thanks a lot

 Johan

 BOOST_AUTO_TEST_CASE(Boost_IsValidOrDissolve_Fails)
 {
   polygon<point_xy<float>> Poly;
   read_wkt("POLYGON((0 3, 3 3, 3 1, 2 1, 2 2, 1 2, 1 1, 2 1, 2 0, 0 0, 0
 3))", Poly);

   BOOST_CHECK(!is_valid(Poly));

   multi_polygon<polygon<point_xy<float>>> Polys;
   dissolve(Poly, Polys);

   BOOST_CHECK(!is_valid(Polys));
 }

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