[gdal-dev] converting KML to CSV
Even Rouault
even.rouault at mines-paris.org
Mon Nov 3 15:39:34 EST 2008
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.
"
Regards,
Even
Le Monday 03 November 2008 14:48:06 Markus Neteler, vous avez écrit :
> On Tue, May 20, 2008 at 3:25 PM, Frank Warmerdam <warmerdam at pobox.com>
wrote:
> > Tim Michelsen wrote:
> >> Hello,
> >> I'd like to convert KML back to CSV.
> >>
> >> When I issue
> >> ogr2ogr -f CSV out.csv in.kml
> >>
> >> there are no coordinates written to the CSV file. Only the placemark
> >> names are
> >> written.
> >>
> >> How can I get ogr2ogr to create a file like
> >> Latitude,Longitude,Name
> >> 48.1,0.25,"First point"
> >> 49.2,1.1,"Second point"
> >> 47.5,0.75,"Third point"
> >
> > Tim,
> >
> > The CSV driver does not support writing geometries, though I can see some
> > support for this might be desirable.
>
> Frank,
>
> I would need the same... is there any work-around (or would it be a
> pain to add that)?
>
> Best
> Markus
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
More information about the gdal-dev
mailing list