[gdal-dev] bug in gdaldem color-relief?
Idan Miara
idan at miara.com
Wed Jun 3 12:41:23 PDT 2020
Hi
I think I found a bug in gdaldem color-relief (tested on gdal 2.4.4 and
3.1.0).
I'm trying to make a color-relief with the attached dtm file (see attached
a micro sample d.tif).
The dtm has no "nodata" value set.
The following commands produce a very different output, although the
difference between the input palettes is just an added nv line which
shouldn't make a difference as the input has no ndv value.
It seems that gdal is treating the "nv" value as 0 and colors the value 0
as black accordingly.
gdaldem color-relief d.tif c.txt c.tif -CO COMPRESS=DEFLATE
gdaldem color-relief d.tif c_nv.txt c_nv.tif -CO COMPRESS=DEFLATE
c_nv.txt:
200 red
-200 green
nv black
Should I open a bug report or am I missing something here?
Kind regards,
Idan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20200603/41dbd78d/attachment-0001.html>
-------------- next part --------------
200 red
-200 green
-------------- next part --------------
A non-text attachment was scrubbed...
Name: c.tif
Type: image/tiff
Size: 6757 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20200603/41dbd78d/attachment-0003.tif>
-------------- next part --------------
200 red
-200 green
nv black
-------------- next part --------------
A non-text attachment was scrubbed...
Name: d.tif
Type: image/tiff
Size: 10742 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20200603/41dbd78d/attachment-0004.tif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: c_nv.tif
Type: image/tiff
Size: 6462 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20200603/41dbd78d/attachment-0005.tif>
More information about the gdal-dev
mailing list