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 |
---|---|---|---|
Priority: | normal | Milestone: | 1.6.0 |
Component: | OGR_SF | Version: | 1.5.2 |
Severity: | normal | Keywords: | |
Cc: |
Description
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.
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.