[gdal-dev] wkbFlatten in tutorial

Frank Warmerdam warmerdam at pobox.com
Sat Jan 5 11:57:16 EST 2008


Ben Discoe wrote:
> In the OGR tutorial here:
>  http://www.gdal.org/ogr/ogr_apitut.html
> 
> I find the text:
>  "For each 2D geometry type there is a corresponding 2.5D type code; however, there is only a C++ class for both the 2D and 3D cases."
> 
> I can't quite parse it.  I understand that wkbFlatten turns e.g. wkbLineString25D into wkbLineString, and that the class OGRLineString stores either type.  Perhaps the tutorial means to say "there is NOT a C++ class.."?  

Ben,

I have adjusted this text as follows, which is hopefully less mixed up
and confusing.

"""
The wkbFlatten() macro is used above to convert the type for a wkbPoint25D
(a point with a z coordinate) into the base 2D geometry type code (wkbPoint).
For each 2D geometry type there is a corresponding 2.5D type code.  The 2D
and 2.5D geometry cases are handled by the same C++ class, so our code will
handle 2D or 3D cases properly.
"""

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo, http://osgeo.org



More information about the gdal-dev mailing list