Boost logo

Geometry :

Subject: Re: [geometry] Changes in WKB (read) behaviour proposal (WKT Part)
From: Mateusz Loskot (mateusz_at_[hidden])
Date: 2013-11-05 13:23:52

On 4 November 2013 23:14, Barend Gehrels <barend_at_[hidden]> wrote:
> Mateusz Loskot wrote On 4-11-2013 23:05:
>> On 4 November 2013 21:11, Barend Gehrels <barend_at_[hidden]> wrote:
>>> Mats Taraldsvik wrote On 4-11-2013 21:31:
>>>>>> The parser should support 3D as long as both the expected point
>>>>>> dimensions
>>>>>> and the wkb point dimensions match. I have tested this for 3D/Z. M is
>>>>>> not supported by WKT yet, apparently, so I could not test this easily.
>>>>> M is there too, see OGC specification in version 1.2.0.
>>>> I meant boost::geometry's WKT reading. At least, I got an error when I
>>>> tried POINTM(1 2 3), but that might be the wrong syntax.
>>> POINT M ( 1 2)
>>> is OK and according to the spec.
>> Barend,
>> Are you sure this is a valid POINT M?
> Oh, thanks for the catch. No it is indeed not officially valid, I stated
> that wrong. But we parse it. We drop the M anyway (currently). We cannot
> handle it because our Point Concept does not contain model-values. Something
> additional would be necessary to be able to assign it to the point in
> question (strategy? policy? assigner?), which can do with it what it wants.
> An easy option would be assigning the M to the third dimension (if any), and
> that is probably currently the case (I have to check).
> A similar reasoning would apply for WKB.

I think a form of assigner would be useful indeed.

To not to get it lost in the abyss of the list, I've opened a task for it

>> The BNF include in the OGC SFS spec is clear the "third value" for M
>> is required:
>> <point z> ::= <x> <y> <z>
>> <point m> ::= <x> <y> <m>
>> <point zm> ::= <x> <y> <z> <m>
> There are not unit tests for them all, we should check and extend the tests.

Ok, see below.

>>> We also have additions: we use WKT for the unit-test too, extensively.
>>> Therefore we also added BOX and SEGMENT. We also support e.g. 5D (e.g.
>>> for
>>> distance centroid) and therefore our wkt's can have 2,3,4,5 or more
>>> dimensions
>> Right, but IMHO those WKTs for tests are sort of Boost.Geometry Extended
>> WKT :)
> Agreed. We should doc the exact behaviour as it is not 100% clear
> everywhere.

Yes, good point.

A couple of weeks ago I was surprised our docs display blank page about WKT
So, I'm going to update it soonish - I've put it on my TODO list:

Best regards,

Mateusz  Loskot,

Geometry list run by mateusz at