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

Related Questions

Error message: Invalid geometry Refactor Fields QGIS

2  Asked on December 11, 2020 by venla

         

Why is my attribute table edit button greyed out?

6  Asked on December 11, 2020 by k-wright

     

Fastest tool for merging raster data

0  Asked on December 11, 2020 by datasciencebegginer

     

Import of CSV vs. Join by attributes Batch

1  Asked on December 11, 2020 by william-ruzek

   

Filter getInfo request

1  Asked on December 11, 2020 by hoge6b01

       

Anyone know where I can find a file like this for Pakistan?

2  Asked on December 11, 2020 by bragg

   

$area is not returning the correct value in QGIS

1  Asked on December 11, 2020 by catocala-nupta

     

Wrapping legend text in QGIS MapComposer at character count

1  Asked on December 11, 2020 by enzo-baldini

     

Filling in gaps between polygons using PostGIS functions

0  Asked on December 11, 2020 by user1298426

   

Manually scale polygon feature in QGIS

0  Asked on December 11, 2020 by user122678

         

Some interior tiles don’t render

1  Asked on December 10, 2020 by rmiller335

   

Ask a Question

Get help from others!

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