TransWikia.com

Making color text file using GDAL?

Geographic Information Systems Asked by alexandersupertramp on April 29, 2021

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

One Answer

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.

Answered by danielgormly on April 29, 2021

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