Hi Gdal,

I am having some issues with gdal_merge.py.

When I merge two tifs together, the original nodata value is converted to 0, no 
matter what that original no data was.  Here is my test case:

Data:

https://data.linz.govt.nz/x/9iitN4 DEM_BA32_3501_2013

https://data.linz.govt.nz/x/WLurgo DEM_BA31_3550_2013

Running gdalinfo on both files reveals a 'nodata' value of -9999.  When I view 
the data as individual files in QGIS, the 'nodata'  regions are confirmed as 
'nodata' or '-9999' and are rendered transparent.

Next I run gdal_merge.py:

gdal_merge.py -o test_merge.tif *.tif

I also try:

gdal_merge.py -n -9999 -a_nodata -9999 -o test_merge_wnodata.tif *.tif

No matter which variation of merge I run, those regions that once contained 
'nodata' or '-9999' are converted to '0' and the nodata value is not retained 
after the merge.  When I load the test_merge_wnodata.tif into QGIS, those 
regions once containing 'nodata', are now filled with 0 and rendered as such.

Maybe this is a bug or am I using gdal_merge.py improperly.

Cheers,

Ian



________________________________

This message contains information, which may be in confidence and may be 
subject to legal privilege. If you are not the intended recipient, you must not 
peruse, use, disseminate, distribute or copy this message. If you have received 
this message in error, please notify us immediately (Phone 0800 665 463 or 
i...@linz.govt.nz) and destroy the original message. LINZ accepts no 
responsibility for changes to this email, or for any attachments, after its 
transmission from LINZ. Thank You.
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to