[GIS] Using ranges for raster colour map in QGIS

colorqgisraster

I have a raster layer in GeoTIFF format, with continuous data values between -1 and +1. For the colour map, I would like…

  • 0 to be green

  • = 0 to be grey
  • <0 to -0.25 to be pink
  • <-0.25 to -0.50 to be dark pink

…etc to 1. Is this possible with QGIS? I tried putting ranges in the colour map box, but it didn't work.

Best Answer

This seems to work for me on a -1.0 - 1.0 NDVI raster

  • Double click on the raster layer in QGIS table of contents/layer list
  • Click "Style" tab (1st tab on the left)
  • Select "Render as" -> "single band gray" and "Single band properties" -> "Color map" -> "Colormap"
  • Click "Colormap" tab (2nd tab from the left)
  • Click "Add entry" and add the following entries:
    • -0.4999999 (< -0.5)
    • -0.2499999 (>-0.5 <-0.25)
    • -0.0000001 (> -0.25 <0.0)
    • 0.000000 (=0)
    • 1 ( >0 <=1)
Related Question