What is the correct color map format (.txt) for a color map I want to load in the Raster Layer Properties/Symbology menu of QGIS (v. 3.6.0)

  • 1
    If you could expand on what you want to achieve, what you tried so far and where you are stuck, that would be great. Currently I got no real idea, what you are asking. – Erik May 7 '19 at 12:03
  • Look at the answer that was posted yesterday – Heiner May 8 '19 at 13:05

It looks like this:

# QGIS Generated Color Map Export File
  1. Line is something like a Headline. I guess you can type almost everything there... (not 100% sure tho)
  2. Line is the interpolation Method you want to use. e.g. INTERPOLATED means Linear and DISCRETE means Discrete.
  3. Line is your first (lowest) class. In this example 427.153 is the minimum value, 68 is Red value, 1 is Green value, 84 is Blue value, 255 is Alpha value, 427.2 is the label.
  4. Line is your second class
  5. Line your third class

and so on... Tip: just try it out by saving it to a text file and watch the differences.

  • Thanks a lot - that is exactly what I was looking for. – Heiner May 8 '19 at 13:05
  • Is there a reference for this? What if the label (a text) has one or more commas? Quoting is not solving it. – Rodrigo Nov 7 '19 at 13:21
  • 1
    @Rodrigo Sorry, not that I know. Seems like you cannot add a comma to this file. Just tried by adding a label with comma in QGIS, then exported it which all works fine. But when importing this just exported file it throws an error because of the comma. – MrXsquared Nov 7 '19 at 18:20

Your Answer

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

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