[FWTools] Fw: ogr2ogr -f "CSV" fileout filein.gml -select ...
Frank Warmerdam
warmerdam at pobox.com
Tue Nov 6 11:02:13 EST 2007
E.Stefanakis wrote:
> Hello
>
> I wish to include in the reported items (-select item_list) the geometry
> as given in GML
> <gml:geometryProperty><gml:geometryType:Point><gml:coordinates>x,y...</....></...>
>
> is this possible under the command
>
> ogr2ogr -f "CSV" fileout filein.gml -select ...
Emmanuel,
This is not supported with ogr2ogr, though in theory you could write a
script that would turn the geometry back into GML and writing it in a
file. However, it wouldn't generally be the exact original GML since it
would have been converted to an OGRGeometry internally and then turned back.
What you can do with ogr2ogr is write the geometry as a string attribute
in WKT format.
eg.
ogr2ogr -f CSV out.csv in.gml -sql 'select *,OGR_GEOM_WKT from srclayername'
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 FWTools
mailing list