Create classification dataset (from categorized raster layer and feature raster)ΒΆ
Create a classification dataset by sampling data for pixels that match the given categories and store the result as a pickle file. If the layer is not categorized, or the band with class values is selected manually, categories are derived from sampled data itself. To be more precise: i) category values are derived from unique raster band values (after excluding no data or zero data pixel), ii) category names are set equal to the category values, and iii) category colors are picked randomly.
Parameters
- Categorized raster layer [raster]
- Categorized raster layer specifying sample locations and target data y. If required, the layer is reprojected and resampled internally to match the feature raster grid.
- Raster layer with features [raster]
- Raster layer used for sampling feature data X.
- Band with class values [band]
- Band with class values. If not selected, the band defined by the renderer is used. If that is also not specified, the first band is used.
Outputs
- Output dataset [fileDestination]
- Pickle file destination.
Command-line usage
>qgis_process help enmapbox:CreateClassificationDatasetFromCategorizedRasterLayerAndFeatureRaster
:
----------------
Arguments
----------------
categorizedRaster: Categorized raster layer
Argument type: raster
Acceptable values:
- Path to a raster layer
featureRaster: Raster layer with features
Argument type: raster
Acceptable values:
- Path to a raster layer
categoryBand: Band with class values (optional)
Argument type: band
Acceptable values:
- Integer value representing an existing raster band number
outputClassificationDataset: Output dataset
Argument type: fileDestination
Acceptable values:
- Path for new file
----------------
Outputs
----------------
outputClassificationDataset: <outputFile>
Output dataset