[gdal-dev] gdaldem color-relief transparency

Even Rouault even.rouault at spatialys.com
Thu Dec 22 07:57:46 PST 2016


Paolo,

This works for me as expected with the following input raster (and using your palette):

$ cat wrk/in.asc
ncols        2
nrows        2
xllcorner    440720.000000000000
yllcorner    3750120.000000000000
cellsize     60.000000000000
NODATA_value 0
 107 123 
 0 100

$ gdaldem  color-relief -alpha  wrk/in.asc wrk/palette.txt wrk/out.tif

$ gdal_translate wrk/out.tif /vsistdout/ -of aaigrid -b 4
ncols        2
nrows        2
xllcorner    440720.000000000000
yllcorner    3750120.000000000000
cellsize     60.000000000000
 255 255
 0 255


Perhaps there's an issue with the nodata value of your raster ?

Even


> Hi all,
> sorry if this is not the right list. Please redirect me elsewhere in case.
> I cannot give a transparency to NULL when creating a coloured raster:
> 
> gdaldem color-relief -alpha temp_clip.tif byr.txt temp_col.tif -of GTiff
> 
> where byr.txt is:
> 
> 0% 5 113 176 255
> 25% 146 197 222 255
> 50% 247 247 247 255
> 75% 244 165 130 255
> 100% 202 0 32 255
> nv 255 255 255 0
> 
> I tried several other combinations, but I cannot hava a transparency of
> NULLs.
> Where am I wrong?
> All the best.


-- 
Spatialys - Geospatial professional services
http://www.spatialys.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20161222/bf70c8c6/attachment.html>


More information about the gdal-dev mailing list