Boost logo

Geometry :

Subject: [geometry] #8376: difference of non-closed polygons returns closed polygon
From: Volker Schöch (vschoech_at_[hidden])
Date: 2014-10-08 13:32:49


https://svn.boost.org/trac/boost/ticket/8376

I'm confused. This ticket is marked resolved. Yet, in the following instance, difference still returns a closed polygon in 1.56.0:

A: MULTIPOLYGON(((1920 1660,1920 1462,3720 1462,3720 3262,1920 3262,1920 1958,2218 2189),(3718 1561,3360 2233,3718 1957),(2818 2653,2218 2189,2818 3253,3360 2233)))
B: MULTIPOLYGON(((1918 2155,1918 1957,2818 2653,3718 1957,3718 2154,2818 3055)))
difference(a, b) -> closed: MULTIPOLYGON(((2218 2189,1920 1660,1920 1462,3720 1462,3720 3262,1920 3262,1920 2157,2562 2799,2818 3253,3043 2829,3718 2154,3718 1957,3718 1561,3360 2233,3718 1957,3360 2234,3360 2233,2818 2653,2218 2189)))

What's even worse, the closing point can no longer be removed by applying boost::geometry::correct, boost::geometry::remove_spikes, or boost::geometry::unique. I used to rely on these methods as a work-around to fix the output from difference for boost 1.55.0, but now it seems that with 1.56.0, not only the original issue isn't fixed but even the work-around isn't available any more.

Am I missing something?
Thanks!
   Volker

--
Volker Schöch | vschoech_at_[hidden]<mailto:vschoech_at_[hidden]>
Senior Software Engineer
We are looking for C++ Developers: http://www.think-cell.com/career
________________________________
think-cell Software GmbH        http://www.think-cell.com>
Chausseestr. 8/E        phone / fax     +49 30 666473-10 / -19
10115 Berlin, Germany   US phone / fax  +1 800 891 8091 / +1 212 504 3039
Amtsgericht Berlin-Charlottenburg, HRB 85229 | European Union VAT Id DE813474306
Directors: Dr. Markus Hannebauer, Dr. Arno Schödl


Geometry list run by mateusz at loskot.net