Translate categorized raster layer

Translates categorized raster layer into target grid. Resampling is done via a two-step majority voting approach. First, the categorized raster layer is resampled at x10 finer resolution, and subsequently aggregated back to the target resolution using majority voting. This approach leads to pixel-wise class decisions that are accurate to the percent.

Usage:

  1. Open the algorithm from the processing toolbox.

  2. Select a raster layer and specify a filepath. To use simple nearest neighbor resampling instead of majority voting, deselect the option under Advanced Parameters. Then click run.

    usr_section/usr_manual/processing_algorithms/raster_conversion/source/usr_section/usr_manual/processing_algorithms_includes/raster_conversion/img/translate_cat_raster.png

Parameters

Categorized raster layer [raster]

A categorized raster layer to be resampled.

Grid [raster]

The target grid.

Majority voting [boolean]

Whether to use majority voting. Turn off to use simple nearest neighbour resampling, which is much faster, but may result in highly inaccurate decisions.

Default: True

Outputs

Output categorized raster layer [rasterDestination]

Raster file destination.

Command-line usage

>qgis_process help enmapbox:TranslateCategorizedRasterLayer:

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

categorizedRaster: Categorized raster layer
    Argument type:  raster
    Acceptable values:
            - Path to a raster layer
grid: Grid
    Argument type:  raster
    Acceptable values:
            - Path to a raster layer
majorityVoting: Majority voting
    Default value:  true
    Argument type:  boolean
    Acceptable values:
            - 1 for true/yes
            - 0 for false/no
            - 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
outputTranslatedCategorizedRaster: Output categorized raster layer
    Argument type:  rasterDestination
    Acceptable values:
            - Path for new raster layer

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

outputTranslatedCategorizedRaster: <outputRaster>
    Output categorized raster layer