[gdal-dev] gdal_merge unexpectedly setting nodata to zeros

thibautvoirand thibautvoirand at gmail.com
Tue Jul 17 05:01:13 PDT 2018


Hi all,

I am trying to merge 4 rasters containing nodata pixels using gdal_merge in
a single file with separate bands.
I use -9999 as nodata value.

In the output file, the first band has the correct nodata pixels (-9999) but
the following 3 bands have some zeros, in pixels that were nodata in the
input file.

My command line:
gdal_merge.py -o out.tif -separate -n -9999 -a_nodata -9999 -ot Float32
b1.tif b2.tif b3.tif b4.tif

My issue seems to resemble this issue:
https://gis.stackexchange.com/questions/190715/gdal-merge-stacking-files-nodata-value-wrong

Is this a bug or am I doing something wrong?

Thanks,
Thibaut



--
Sent from: http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html


More information about the gdal-dev mailing list