[gdal-dev] Using -overwrite to create empty feature class

Donovan Cameron sault.don at gmail.com
Wed Feb 1 16:22:42 EST 2012

Afternoon List.

I am trying to generate an empty feature (shp or gml) from a template that
retains both the attribute-table schema and map projection.

I can't get the *-overwrite *flag to work, it just copies the entire
feature (ie, makes a duplicate):
*ogr2ogr -overwrite -f "GML" geoname.gml /vsizip/vsicurl/ ${inZIP}/${inGML}*
The next commands <http://gis.stackexchange.com/a/16510/1297>[1] work using
*-where *or *-fid*:
*ogr2ogr -f "GML" geoname.gml /vsizip/vsicurl/ ${inZIP}/${inGML} -where
"FID < 0"*
*ogr2ogr -f "GML" geoname.gml /vsizip/vsicurl/ ${inZIP}/${inGML} -fid "< 0"*

I thought the* -overwrite* flag would delete the output layer and recreate
it empty <http://www.gdal.org/ogr2ogr.html>[2]?
Can someone help me figure out how to properly use -overwrite?



[1] http://gis.stackexchange.com/a/16510/1297
[2] http://www.gdal.org/ogr2ogr.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20120201/50c7e1df/attachment.html

More information about the gdal-dev mailing list