I'm trying to generate a color relief map from a SNODAS greyscale geotiff file scaled from 16-bit to 8-bit. Given the type of data and the scaling, it seems the pixel values are set at 1-5, with 5 being nearest white and 1 being nearest black. I'm trying to create a color relief from this using gdaldem using this:

gdaldem color-relief [inputfile.tif] [color.txt] [outputfile.tif]

However, I am returned this:

ERROR 1: Unknown color : ArialMT;}

This appears to be the font used in the text file, rather than the values I've put there, which is this:

0 nodata
1 blue
2 yellow
3 orange
4 red
5 white

Any ideas here?

  • 3
    Make sure your text file is plain text and not rich text or something else. Open it it regular-old notepad to confirm (or cat your file or something if you're on *nix). – mikewatt Jun 13 '19 at 0:39
  • That was it. Simple! Thank you... – alexandersupertramp Jun 13 '19 at 0:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.