[gdal-dev] gdaldem color-relief geotiff alpha band nv value not working (take 2)

Even Rouault even.rouault at spatialys.com
Fri Aug 7 13:16:10 PDT 2015


Homme,

> Band 1 Block=256x256 Type=Float32, ColorInterp=Gray
>    NoData Value=nan
> 
> All files are available at <http://dropcanvas.com/yazx9>.

Fixed by https://trac.osgeo.org/gdal/ticket/6066
The issue was that gdaldem didn't have the needed code to correctly deal with 
nan as the nodata value.

> 
> I find that the NODATA values are assigned the maximum colour value in
> dhaka-colour-relief.tif i.e. RGBA 0 1 36 255.
> 
> Changing the NODATA to -1 using `gdal_translate -a_nodata -1` does not
> seem to affect this outcome.  I have tested this using both GDAL 1.11.2
> and a recent trunk build on Linux.

That only changes the nodata *metadata* value, not the actual pixels. For that 
you could do "gdalwarp -dstnodata -1" instead.

Even

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com


More information about the gdal-dev mailing list