[geos-devel] WkbReader and Z-geometries

Oyvind Idland oyvind.idland at gmail.com
Wed Aug 3 07:19:05 EDT 2011


i am trying to read WKB chunks based on the iso SQL/MM part3 spec. However,
this doesn't seem to work.

>From the WkbReader source code doc:
"This implementation supports the extended WKB standard for representing
3-dimensional coordinates. The presence of 3D coordinates is signified by
setting the high bit of the wkbType word."

Which extended WKB standard is being refered to here ?

For example, In the SQL/MM spec, various point types are defined as the
following unsigned values (not hex):

<wkbpoint>     1
<wkbpointz>   3000001
<wkbpointzm> 2000001
<wkbpointm>   4000001

However, in the WkbReader.cpp the following logic is used:

    int typeInt = dis.readInt();
    int geometryType = typeInt & 0xff;
    bool hasZ = ((typeInt & 0x80000000) != 0);
    if (hasZ) inputDimension = 3;
    else inputDimension = 2; // doesn't handle M currently

Is there any plans to implement support for SQL/MM ?  (I can volunteer for a
patch, if desired)

-- Oyvind
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/geos-devel/attachments/20110803/57fb06a0/attachment.html

More information about the geos-devel mailing list