Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an image where pixel values are integers, they go from 0 to 6 and I also have some 999. I want the value 999 to be transparent, which I could achieve by myself. I would like values 0 to 6 to be different colors. I have no idea how to do this. Cant anyone help me?

thank you!

share|improve this question
up vote 1 down vote accepted

Open layer properties, in "Style" tab choose "Colormap" in "Color map" drop-down menu. Then go to "Colormap" tab and set up colours.

share|improve this answer
Cool! I did it Thank you... Is there anyway to automatize this? so as to not select a color one by one... python maybe? – JEquihua Sep 20 '12 at 20:00
@JEquihua, if you have to apply the same Colormap to the set of rasters, save the style you've created for the first one ("Save style..." in layer properties) as .qml-file and use "Load style" for others. Also there is MultyQml plugin that will apply chosen .qml to the set of rasters. – SS_Rebelious Sep 20 '12 at 20:11
I'm not really applying the same colormap to a set of rasters, I did an unspervised classification to about 150 images, each one could have a different amount of classes. So... Maybe this would not work so well.. any thoughts? – JEquihua Sep 20 '12 at 20:45
@JEquihua, make a colormap that will cover the maximum number of classes you may get and apply it to all of the images. There is nothing wrong if some of the values from colormap won't be used in particular raster. – SS_Rebelious Sep 20 '12 at 21:49

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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