2012-11-26

Custom Colormaps in QGIS

QGIS Colormap view
QGIS (version 1.8 and before) lacks built in predefined colormaps . The only default possibility to create a colormap is to classify by equal intervals and with red-blue colors. While it is still possible to manually edit automatically created colormap, I found it completely unhandy. Firstly, because most of my raster data I would like to represent with certain step within chosen amplitude, secondly, I would like to represent the raster in different color scale and thirdly - I would like to use more color scales than one.

Interface of my Colormapping tool. Two color
scales used here - from black to white and from
white to green.
When someone creates the colormap for chosen raster, it is possible to save that custom colormap as a plain text file. That gives an opportunity to prepare such a text file outside of QGIS, no matter where and how. As my working environment is Windows and I know some Visual Basic  stuff, I wrote a little helper program, where I am able to set start value, count of the categories, step of the value and combine or put together multiple colormap scales. 

Important notice: the first and default color scale can be obtained pushing button "Classify". For other scales click right mouse button on a chosen category and menu will appear.

The program is written in Visual Basic 2010 and is dependent of Microsoft .NET 4 framework. It will not be able to run while that framework has not been installed.
Short overview about program usage can be seen in following video.




ColorMapper for QGIS - download

2 komentāri:

  1. Hey, after I make the .txt color document, I want to apply it to the raste (.ASC) layer, but it only allows me to use the RED-BLUE ramp, even after I uploaded the .txt color document. Any idea?

    AtbildētDzēst
    Atbildes
    1. That seems to be an issue with QGIS or filetype, I`m not sure. Which version of QGIS do You use? I just tried to apply colors to some NOAA data, ASC file and it worked fine for me. Did you switch to Color map - "colormap" under "Style" tab? And did you load "Load color map from file" instead of "Load Style"? Its really easy to mess up with these two - loading styles and loading colormaps. Check the video at 2:26-2:28. If everything is fine, then you should see your custom colormap in the Layer Properties window. Let me know how things goin on and how you solve (or didnt) it.

      Dzēst