[gdal-dev] converting KML to CSV

Markus Neteler neteler at osgeo.org
Tue Nov 4 02:16:16 EST 2008


Even,

On Mon, Nov 3, 2008 at 9:39 PM, Even Rouault
<even.rouault at mines-paris.org> wrote:
> Markus,
>
> this turned out not to be too difficult to implement. So here it is, in r15684
>
> Extract from the updated doc :
> "
> Layer Creation options:
> - GEOMETRY (From GDAL 1.6.0): By default, the geometry of a feature written to
> a .csv file is discarded. It is possible to export the geometry in its WKT
> representation by specifying GEOMETRY=AS_WKT. It is also possible to export
> point geometries into their X,Y,Z components (different columns in the csv
> file) by specifying GEOMETRY=AS_XYZ, GEOMETRY=AS_XY or GEOMETRY=AS_YX.
> The geometry column(s) will be prepended to the columns with the attributes
> values.
> "

Fantastic - works well! I tested:
ogr2ogr -f CSV out it_mountains.shp -lco GEOMETRY=AS_XYZ

thanks a lot,
Markus


More information about the gdal-dev mailing list