1

I want to render an IMG file according to a specific renderer, and export to a jpeg File. I have asked a question about this, and got a satisfactory answer.

The issue now is that I need to write a color configuration file which matches the symbology that is required. My Symbology is supposed to be like this:

enter image description here

Based on this answer, I have found that you can write the colors config file somewhat like this:

40  140 0   3
35  204 9   9
30  255 67  11
25  255 165 0
20  255 246 0
15  54  254 0
10  0   255 209
5   1   127 255
0   4   0   213
-4  133 1   243

My problem is that I don't understand if the given values for the pixels are the lower bound, or the upper bound. I don't know how to specify the ranges according to the symbology that I need.

Where can I Find documentation for Gdaldem's color configuration file? Or alternatively, how can I specify the ranges in the configuration file?

Devdatta Tengshe
  • 41,311
  • 35
  • 139
  • 263

1 Answers1

3

gdaldem will use the colors of the lookup table at their exact position and it will blend those colours by interpolating between the input values.

so, in your example, the value of 40 will be coloured exactly in 140 0 3 and the value of 35 coloured in 204 9 9, then the "missing" values are interpolated (you can see on the answer that you mentioned that you have a "true" gradient).

I haven't tested, but you could duplicate your values if you want ranges with "sharp" transitions.

40 140 0 3

36 140 0 3

35 204 9 9

31 204 9 9

30 255 67 11

26 255 67 11

radouxju
  • 49,636
  • 2
  • 71
  • 144