Opened 15 years ago
Closed 15 years ago
#2561 closed defect (fixed)
ogr2ogr overwrite option not working for Shapefile output
|Reported by:||tomkralidis||Owned by:||warmerdam|
Note that used to work in 1.2.6:
$ ogr2ogr -F "ESRI Shapefile" ./output_dir ./file.ovf Generating Active_Climate_Stations-fr... FAILED: Layer Active_Climate_Stations-fr already exists, and -append not specified. Consider using -append, or -overwrite. ERROR 1: Terminating translation prematurely after failed translation of layer Active_Climate_Stations-fr $ ogr2ogr -overwrite -F "ESRI Shapefile" ./output_dir ./file.ovf Generating Active_Climate_Stations-fr... ERROR 6: DeleteLayer() not supported by this data source. DeleteLayer() failed when overwrite requested. ERROR 1: Terminating translation prematurely after failed translation of layer Active_Climate_Stations-fr
We have sinced implemented a workaround to manually remove the files, but it would valuable to implement DeleteLayer() for shapefiles here.
Change History (1)
comment:1 by , 15 years ago
|Status:||new → closed|
Note: See TracTickets for help on using tickets.
OGRShapeDataSource::DeleteLayer() implemented in r15328.
Note that ogr2ogr -overwrite only works when using a directory as the destination for the shapefile driver. I don't see any trivial way of making it work when the destination is a filename.