I'm using gdaldem color-relief to read a Uint32 raster and write an RGB tif. The input color_text_file has one line:
My input file is a single (large) pixel of value 102216130, matching the one line in the color text file.
If I run gdaldem with the
-exact_color_entry flag, the output is a pixel with RGB 0 0 0. If I run it without the flag, the output is correct, a pixel with 23 105 102.
Why is this? It certainly doesn't matter for this raster (
-exact_color_entry appears to be unnecessary), but for rasters with more lookup values in the color text file (700, in one case), the general case (i.e. not using
-exact_color_entry) is important, as output colors do not exactly match my input.
The help page for gdaldem states that
use strict matching when searching in the color configuration file. If none matching color entry is found, the "0,0,0,0" RGBA quadruplet will be used
Can I edit this color configuration file? The colors that are being approximated seem normal (R 21, G 191, B 217 for example) but the exact values are not being written to tiff.
Alternatively, is there a better tool than gdaldem for essentially reclassifying one raster to three bands?