[gdal-dev] Shape files 3D -> 2D

Even Rouault even.rouault at mines-paris.org
Tue Sep 8 14:25:15 EDT 2009


Selon Christoph Dohmen <christoph.dohmen at cae.de>:

You're not very explicit about what you want to do. From the tile, I guess you
want to get rid of the Z coordinate of the geometry to produce 2D only
geometries ?

If so, you need to specify '-nlt LINESTRING' (remove the 25D otherwise you'll
still get the Z coordinate) or '-lco SHPT=ARC' (this is a layer creation option,
thus lco instead of dsco, and the value is then ARC as specified in
http://gdal.org/ogr/drv_shapefile.html) .

> Hi list,
>
> I have a set of shape files which are reported as 'Geometry: 3D Line String'.
> The geometries
> are all LINESTRING, but they have 3D coordinates. Playing around with ogr2ogr
> and different
> options like '-nlt LINESTRING25D' or '-dsco "SHPT=LINESTRING25D"' did not
> bring the expected
> results. Everytime a call to 'poGeometry->getGeometryType()' delivers a
> wkbGeometryCollection.
>
> Can anyone give me a hint how to deal with those data?
>
> Christoph
>




More information about the gdal-dev mailing list