Rasterize categorized vector layer

Rasterize a categorized vector layer into a categorized raster layer. Output category names and colors are given by the source layer. 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.


Categorized vector layer [vector]

A categorized vector layer to be rasterized.

Grid [raster]

The target grid.

Minimum pixel coverage [%] [number]

Exclude all pixel where (polygon) coverage is smaller than given threshold.

Default: 50

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 class decisions.

Default: True


Output categorized raster layer [rasterDestination]

Raster file destination.

Command-line usage

>qgis_process help enmapbox:RasterizeCategorizedVectorLayer:


categorizedVector: Categorized vector layer
    Argument type:  vector
    Acceptable values:
            - Path to a vector layer
grid: Grid
    Argument type:  raster
    Acceptable values:
            - Path to a raster layer
coverage: Minimum pixel coverage [%]
    Default value:  50
    Argument type:  number
    Acceptable values:
            - A numeric value
majorityVoting: Majority voting
    Default value:  true
    Argument type:  boolean
    Acceptable values:
            - 1 for true/yes
            - 0 for false/no
outputRasterizedCategories: Output categorized raster layer
    Argument type:  rasterDestination
    Acceptable values:
            - Path for new raster layer


outputRasterizedCategories: <outputRaster>
    Output categorized raster layer