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

Even Rouault even.rouault at mines-paris.org
Wed Nov 9 06:55:16 EST 2011


Selon Hermann Peifer <peifer at gmx.eu>:

> On 08/11/2011 20:28, Even Rouault wrote:
> >
> > gdalwarp something.tif something.tif -t_srs EPSG:XXXX makes no sense...
>
> Indeed: typing 'something.tif' twice should not be necessary. But the
> following could theoretically make sense (in analogy to GNU sed's
> -i/--in-place switch (which creates a temporary file and later
> *overwrites* the original file):
>
> gdalwarp -i something.tif -t_srs EPSG:XXXX
>
> However, as one hardly get things right in the first run: there is a
> good chance that the result is not what you want -- and the original
> file is gone :-(. At least this happens to me whenever I use sed's -i
> switch. So I wouldn't see a need for introducing this behaviour in GDAL
> command line utilitiies.

There's no risk to see that in the case of gdalwarp. GDAL has no infrastructure
to do in place reprojection and it would be really challenging to do that
without a temporary file.

>
> Hermann
>




More information about the gdal-dev mailing list