I have an 8-bit greyscale image that I want to convert to a "heat map" based on data values (0-255), using a color ramp. I'm aware that gdaldem works with color-relief, so I used the following steps from a prior post:

  1. Take a raster of your choice (like SRTM as an example)

  2. Create the following text file named col.txt:

     0 black
     100 blue
     200 yellow
     300 orange
     400 red
     500 white
  3. On command line, run

     gdaldem color-relief N51E007.hgt col.txt out.tif

    When I do this, I get the following:

    "ERROR 1: Unknown color : Menlo-Regular;}"

It seems it is seeing the font type, for some odd reason. enter image description here


1 Answer 1


This is probably completely redundant now but it seems like you have additional information in your col.txt file. Perhaps the editor you used specified styling information.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.