[gdal-dev] viewing data

keith lewis lewis.milehi at gmail.com
Wed Jan 9 19:31:49 EST 2008


You can extract the attributes and geometry (point, lines and polygons) from
a Shapefile to a text file.

Here is an example:
ogr2ogr -f "CSV" output2 . -sql "select OGR_GEOM_WKT,* from parcels" -nln
parcel

The geometry field, in the CSV file, will be named OGR_GEOM_WKT.
The geometry coordinates will be in Well Known Text format.

Here is a sample of the WKT coordinates -
"POLYGON ((483368.9966979493 4813347.6753904885,483368.16060633108 ...

Please see http://www.gdal.org/ogr/ogr_sql.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20080109/96892d18/attachment.html


More information about the gdal-dev mailing list