[gdal-dev] Strange behavior of gdalwarp with -overwrite option

Alexander Bruy alexander.bruy at gmail.com
Tue Nov 8 13:07:11 EST 2011


Hi all,

in gdalwarp documentation [0] listed option "-overwrite" with next description:
-overwrite:
    (GDAL >= 1.8.0) Overwrite the target dataset if it already exists.

But when I try to reproject image using next command

gdalwarp -t_srs EPSG:4326 -overwrite mosaic.tif mosaic.tif

i get next error

Creating output file that is 9122P x 2341L.
ERROR 4: `mosaic.tif' not recognised as a supported file format.

and mosaic.tif becomes 8 bytes size file (seems only tif header).
Is this bug or I misunderstand -overwrite option usage?
Tested on Slackware 13.37, GDAL 1.8.1, released 2011/07/09.


[0] http://www.gdal.org/gdalwarp.html

Thanks

-- 
Alexander Bruy


More information about the gdal-dev mailing list