TransWikia.com

Gdaldem color-relief gives uniform-colored GeoTIFF

Geographic Information Systems Asked by interwebjill on October 9, 2020

I have generated a GeoTIFF from grib temperature data in greyscale using:

gdal_translate -of GTiff -a_srs EPSG:4326 -b 28 2019-07-21-120000.grib2 output.temperature.tiff

This is a 32bit floating point image. I also tried using:

gdal_translate -of GTiff -ot Byte -a_srs EPSG:4326 -b 28 2019-07-21-120000.grib2 output.temperature2.tiff

which outputs an 8bit image. I am trying to use:

gdaldem color-relief input.tiff CET-D1A.csv output.tiff

to get a color visualization of the temperature values, which has values ranging between 220 and 320 Kelvin. The color table csv has lines like this:

220,23,41,114
220.4,24,42,117
220.8,24,43,120
...
319.2,107,7,3
319.6,105,7,3
320,102,7,2

Here is a screenshot of the data in Panoply:

enter image description here

and here is the result of the above gdal command on this data (in reduced dimensions to work in StackExchange). Both the 32bit and 8bit GeoTIFFs gave the same uniform blue GeoTiff.

enter image description here

What might I be doing wrong here? Incidentally, I would love to preserve the 32bit depth if possible.

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP