|
Geometry : |
Subject: Re: [geometry] #8376: difference of non-closed polygons returns closed polygon
From: Menelaos Karavelas (menelaos.karavelas_at_[hidden])
Date: 2014-10-10 05:17:12
Hi Volker.
On 10/10/2014 11:39 Ïμ, Volker Schöch wrote:
>> 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.
> Thank you very much for double-checking! In the mean time I, too, found that things may not be what they appear to be, but I could not yet nail it. Apparently, not only wkt but also read_wkt mix up the closedness. I got caught by this because I have a number of unit tests in place based on read_wkt, which are now triggering like crazy.
>
> I'm glad that it's just wkt/read_wkt, and not the actual algorithm, that is at fault.
>
> Should I file a ticket for the wkt/read_wkt issue? It interferes with debugging, unit-testing, and with reporting issues, too!
I am quite new to Boost.Geometry, so please take my writings with a
grain of salt.
The behavior of bg::wkt was changed in boost 1.56 on purpose. The
rationale for the change is that the WKT format does not account for
open polygons; open areal geometries is a BG "thingy". So in order to
have valid WKT descriptions of geometries, open areal geometries are
outputted as if they were closed (again, to have a valid WKT description).
I do not want to encourage you or discourage you to file a ticket. You
are free to do as you want, and in fact filing a ticket will give us the
motivation to look over the issue again. I just wanted to let you know
of the current status.
All the best,
- m.
> Regards
> Volker
> --
> Volker Schöch | vschoech_at_[hidden]
> Senior Software Engineer
>
> We are looking for C++ Developers: http://www.think-cell.com/career
>
> think-cell Software GmbH | Chausseestr. 8/E | 10115 Berlin | Germany
> http://www.think-cell.com | phone +49 30 666473-10 | US phone +1 800 891 8091
>
> 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