#3825 closed defect (fixed)
ogr2ogr -overwite does not work for shapefiles when file does not exist
Reported by: | wbloos | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | 1.8.0 |
Component: | Utilities | Version: | 1.7.2 |
Severity: | normal | Keywords: | ogr2ogr, shapefile, overwrite |
Cc: |
Description
The command below renders an error in version gdal-bin 1.7.2-4~lucid3
ogr2ogr -f "ESRI Shapefile" -overwrite /var/cache/mapserver/244_2010_wsn_bezoekstippen PG:"host=localhost dbname=dpeep user=upeep password=ppeep" -sql "select * from wsn.vw_punten_per_bezoek where plotid=9643 and jaar=2010" FAILURE: Unable to open existing output datasource `/var/cache/mapserver/244_2010_wsn_bezoekstippen'.
In 1.6.3, the same command does work under the same conditions. Omitting -overwrite solves the problem for 1.7.2 BUT: if you can check if the file exists,with an OS user on the filesystem, you can also delete it. Then the option -overwrite is useless. So i think this can be considered a defect.
cheers, wbl
Change History (3)
comment:1 by , 14 years ago
Keywords: | ogr2ogr shapefile overwrite added |
---|
comment:2 by , 14 years ago
Component: | default → Utilities |
---|---|
Milestone: | → 1.8.0 |
Resolution: | → fixed |
Status: | new → closed |
comment:3 by , 14 years ago
Previous fix cleared the bAppend flag, which break some other use cases. Fixed in r21265
Fixed in trunk in r21110. Test added in r21112