Create default paletted raster renderer

Create a paletted raster renderer from given categories and set it as the default style of the given raster layer. This will create/overwrite the QML sidecar file of the given raster layer.

Usage:

  1. Start the algorithm from the Processing Toolbox panel.

  2. Select a raster layer, define your style, then click run.

    ../../../../_images/pallete.png

Parameters

Raster layer [raster]

The raster layer for which to create the QML sidecar file.

Band [band]

The renderer band.

Categories [string]

Comma separated list of tuples with category value, name and color information. E.g. (1, ‘Urban’, ‘#FF0000’), (2, ‘Forest’, ‘#00FF00’), (3, ‘Water’, ‘#0000FF’)

Command-line usage

>qgis_process help enmapbox:CreateDefaultPalettedRasterRenderer:

----------------
Arguments
----------------

raster: Raster layer
    Argument type:  raster
    Acceptable values:
            - Path to a raster layer
band: Band
    Argument type:  band
    Acceptable values:
            - Integer value representing an existing raster band number
categories: Categories
    Argument type:  string
    Acceptable values:
            - String value
            - field:FIELD_NAME to use a data defined value taken from the FIELD_NAME field
            - expression:SOME EXPRESSION to use a data defined value calculated using a custom QGIS expression

----------------
Outputs
----------------