|
Geometry : |
Subject: Re: [geometry] problem with wkt io
From: Barend Gehrels (barend_at_[hidden])
Date: 2013-10-10 18:20:38
Hi Mateusz,
On 10-10-2013 0:28, Mateusz Loskot wrote:
> On 9 October 2013 20:00, lepere renaud <lepere.renaud_at_[hidden]> wrote:
>> I am using read_wkt to read wkt polygons and wkt to convert them to string
>> but i have some problems. I though that wkt polygons should have the last
>> point equal to the first one ; however in my model polygons are not closed.
>> The function read_wkt and wkt do not handle the last point, is this normal
>> or did i missed something ?
> On reflection, I think it is a good idea to fix it indeed.
>
> I submitted patch with a fix proposal
>
> "Impose closed rings of polygon in WKT output"
>
> https://svn.boost.org/trac/boost/ticket/9217
>
> If the patch is acceptable, I will commit, so please confirm.
>
Yes, I agree it is a good idea to have the WKT always closed for
polygons, and I agree with the patch.
One detail, it can also be done at compiletime (check if model is
closed) with the same boolean flag, or even with a compile-time iterator
(more complex), but the proposed solution is OK too and has the
advantage that open polygons which are closed (somehow) are not closed
again.
Regards, Barend
Geometry list run by mateusz at loskot.net