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

Homme Zwaagstra hrz at geodata.soton.ac.uk
Mon Aug 10 01:53:32 PDT 2015


Hello Even,

On 07/08/15 21:16, Even Rouault wrote:
> 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.

That's fantastic, many thanks.  I've tested it and the output looks great.
Those pesky nans again...

>>
 >> 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.

Thanks, and I note it is well documented in the manual.

Homme.

> Even
 >


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20150810/a9d2e90d/attachment.html>


More information about the gdal-dev mailing list