QGIS Algorithm provided by QGIS (native c++) Cell statistics (native:cellstatistics). The Cell statistics algorithm computes a value for each cell of the output raster. At each cell location, the output value is defined as a function of all overlaid cell values of the input rasters. The output raster's extent and resolution is defined by a reference raster. The following functions can be applied on the input raster cells per output raster cell location: ul liSum/li liCount/li liMean/li liMedian/li liStandard deviation/li liVariance/li liMinimum/li liMaximum/li liMinority (least frequent value)/li liMajority (most frequent value)/li liRange (max-min)/li liVariety (count of unique values)/li/ul Input raster layers that do not match the cell size of the reference raster layer will be resampled using nearest neighbor resampling. The output raster data type will be set to the most complex data type present in the input datasets except when using the functions Mean, Standard deviation and Variance (data type is always Float32/Float64 depending on input float type) or Count and Variety (data type is always Int32). iCalculation details - general:/i NoData values in any of the input layers will result in a NoData cell output if the Ignore NoData parameter is not set. iCalculation details - Count:/i Count will always result in the number of cells without NoData values at the current cell location. iCalculation details - Median:/i If the number of input layers is even, the median will be calculated as the arithmetic mean of the two middle values of the ordered cell input values. In this case the output data type is Float32. iCalculation details - Minority/Majority:/i If no unique minority or majority could be found, the result is NoData, except all input cell values are equal.
qgis_cellstatistics(
INPUT = qgisprocess:::qgis_default_value(),
STATISTIC = qgisprocess:::qgis_default_value(),
IGNORE_NODATA = qgisprocess:::qgis_default_value(),
REFERENCE_LAYER = qgisprocess:::qgis_default_value(),
OUTPUT_NODATA_VALUE = qgisprocess:::qgis_default_value(),
CREATE_OPTIONS = qgisprocess:::qgis_default_value(),
OUTPUT = qgisprocess:::qgis_default_value(),
...,
.complete_output = .complete_output_option(),
.quiet = .quiet_option(),
.messages = .message_option()
)
multilayer
- Input layers. .
enum
of ("Sum", "Count", "Mean", "Median", "Standard deviation", "Variance", "Minimum", "Maximum", "Minority", "Majority", "Range", "Variety")
- Statistic. Number of selected option, e.g. '1'. Comma separated list of options, e.g. '1,3'.
boolean
- Ignore NoData 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.
raster
- Reference layer. Path to a raster layer.
number
- Output NoData value. A numeric 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.
string
- Creation options. 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.
rasterDestination
- Output layer. Path for new raster layer.
further parameters passed to qgisprocess::qgis_run_algorithm()
logical specifying if complete out of qgisprocess::qgis_run_algorithm()
should be used (TRUE
) or first output (most likely the main) should read (FALSE
). Default value is TRUE
.
logical specifying if parameter .quiet
for qgisprocess::qgis_run_algorithm()
Default value is TRUE
.
logical specifying if messages from qgisprocess::qgis_run_algorithm()
should be printed (TRUE
) or not (FALSE
). Default value is FALSE
.