Opened 12 years ago

Closed 12 years ago

#4375 closed enhancement (invalid)

ogr2ogr -overwrite debug messages

Reported by: peifer Owned by: warmerdam
Priority: normal Milestone:
Component: default Version: svn-trunk
Severity: normal Keywords:
Cc:

Description

I just noted that in case there in no file to overwrite, ogr2ogr's debug message is "OGROpen .. failed", which I found a bit puzzling, at a first glance. And in cases where an existing shapefile is actually overwritten, no related message comes up.

ogr2ogr -s_srs epsg:4326 -t_srs epsg:3035 g2008_0.shp ../g2008_0.shp (...) -overwrite
OGR: OGROpen(../g2008_0.shp/0x1fb9d50) succeeded as ESRI Shapefile.
OGR: OGROpen(g2008_0.shp) failed.
OGR: OGROpen(g2008_0.shp) failed.

Change History (1)

comment:1 by Even Rouault, 12 years ago

Resolution: invalid
Status: newclosed

What you observe seems logical to me. To overwrite (a layer), you need to be able to open the datasource. So ogr2ogr first starts trying to open it. If it doesn't exist, it goes on silently (at the user level, but at the debug level, it is a failed open) and will create it. Debug messages are not supposed to always look logical/natural to users...

Note: See TracTickets for help on using tickets.