I am trying to style a new single-band raster with a platted style, but when I choose the ‘platted’ no colors or values appear, and I can’t find a way to add them.
QGIS Essen, Win 7.
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It only takes a minute to sign up.Sign up to join this community
I do not think QGIS currently supports the creation of palettes for rasters as this was mentioned in the book Mastering QGIS which was published in Mar 2015:
Paletted raster band rendering
The paletted raster band renderer applies a single color to a single raster value. QGIS supports the loading of rasters with paletted colors stored within and the changing the color assigned to the raster value. QGIS does not currently support the creation of color palettes for single band rendering. However, existing QGIS layer style files (.qml) that contain palettes can be applied by clicking on the Load Style button in the layer properties.
If you don't have too many values to encode, here's an example file that you could import from the style menu at the bottom to get around the limitations mentioned in the other answers. You just have to save it as
<!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'> <qgis version="2.18.14"> <rasterrenderer opacity="1" alphaBand="0" band="1" type="paletted"> <rasterTransparency/> <colorPalette> <paletteEntry value="0" color="#000000" label="0"/> <paletteEntry value="1" color="#ffffff" label="1"/> </colorPalette> </rasterrenderer> </qgis>
In this example, there is one
paletteEntry for each value I'm trying to color - two in total. Can just add more below to meet your needs.