[gdal-dev] Re: Problem with nodata values

Hermann Peifer peifer at gmx.eu
Sat Jul 25 14:02:22 EDT 2009


> 
> Hermann,
> 
> It appears they are distinct items.  The INIT_DEST essentially sets
> the output file completely to the indicated value when it is created
> while the dstnodata switch determines whether the warper considers an
> existing pixel to be set in the output file yet or not when attempting
> to do alpha blending and such.

Aha. Then the gdalwarp man page might be misleading. It says:

-dstnodata value [value...]:
   (...) New files will be initialized to this value and ...


On the other hand:
I am currently warping quite a lot of DEM files with '-srcnodata -9999 -dstnodata -9999' and the result is what I expected: both nodata values that existed in the source file and the additional ones generated through warping appear as -9999 in the destination file.

Hermann


More information about the gdal-dev mailing list