|
Geometry : |
Subject: Re: [geometry] #8376: difference of non-closed polygons returns closed polygon
From: Menelaos Karavelas (menelaos.karavelas_at_[hidden])
Date: 2014-10-09 16:57:58
Hi Volker.
On 08/10/2014 08:32 ??, Volker Schöch wrote:
>
> 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*)))
>
I tried this example as well (see attached program and output).
What I see is that the output has 18 points (I can see that from both
the dsv printout of the geometry, as well as from bg::num_points). So
the resulting multi-polygon is not closed, but when you output it
through bg::wkt, it is shown as closed.
> 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
>
I don't get this. There is no point to remove. The resulting
multipolygon is open, but it seems it is not valid (I tried bg::is_valid
on it), but have not investigated more. If there is an issue with the
output, I do not think that this is closedness ot openness.
- m.
> 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
> <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 mailing list
> Geometry_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/geometry
Geometry list run by mateusz at loskot.net