3

I have a single band grey shade tiff image which does not have a a color palette associated with it. I need to open up the symbology and assign a color to each unique landcover class.

I am looking for where I can read up on the "how to's" of opening symbology and adding a color palette to display each classification type in a unique color.

I am using QGIS version 2.18.17

I have attempted to use some of the hints in the QGIS documentation (esp. Section 8.2 on rasters) -- however going to the screen for Properties\Style\Band rendering and selecting "singleband pseudocolor" in the drop down menu does not get me where I need to be. My data set is has 17 types of land cover in the classification so ideally I want to create a legend with a color for each cover type. I think that I want to use the Properties\Style\band rendering drop down menu option "paletted" but selecting this screen offers me no options to create or modify the layer's legend? It's a dead end.

It seems like one solution might be to go to Properties\Style\Band rendering\singleband psuedocolor and then in the bottom drop down box "Mode"choose "equal interval" This then allows you to add additional classes to the legend. After that you can pick the colors you want for each class and then I guess go to the "Style" drop down menu at the bottom of the page an "save as"?

And you can also fill in the legend "labels" for the cover classes (e.g.,"grasslands") by entering it in the "label unit suffix" box. Once you make an enter there you can manually edit the rest of the land cover classification names "deciduous forest" etc. I still do not think this is the "right" way to do this but you do end up with a legend that can be saved as a .qml file that seems to work when you load it on the data set. The reason I do not think it is the right way to do it is that "Legend" and "palette" images do not show up alongside of the "thumbnail" image at the bottom of the Properties\Style\Band rendering page. So it works in a pinch but maybe someone who has been working with QGIS more than my two days will come along and explain how to do it right!

  • Possible duplicate of Automatically style raster using unique values in QGIS? – lambertj Mar 13 '18 at 16:04
  • If you're just looking for where to read up, it's always a good idea to start at the QGIS Documentation. In the training manual, there's a whole lesson on raster symbology that should cover what you need. – JoshC Mar 13 '18 at 16:06
  • May be this can help: gis.stackexchange.com/questions/165792/… – Gerardo Jimenez Mar 13 '18 at 19:17
  • 1
    The suggestions have been useful but the problem remains. Properties\Style\Band rendering and selecting "Paletted" in the drop down menu is a dead end. Going Properties\Style\Band rendering\singleband pseudocolor" and selecting "equal intervals" in the "Mode" in the drop down menu allows additional classes to be added and color coded and labeled -- but this new legend cannot be "Applied" to the image. It can be saved. Reloading the image and going to Properties\Style\Band rendering\paletted and then loading the save "style" (.qml) file is successful but again cannot be Applied to the image. – BernieD Mar 14 '18 at 3:57
  • sorry duplication. – BernieD Mar 14 '18 at 4:49

Your Answer

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

Browse other questions tagged or ask your own question.