QGIS Algorithm provided by QGIS (native c++) Round raster (native:roundrastervalues). This algorithm rounds the cell values of a raster dataset according to the specified number of decimals. Alternatively, a negative number of decimal places may be used to round values to powers of a base n (specified in the advanced parameter Base n). For example, with a Base value n of 10 and Decimal places of -1 the algorithm rounds cell values to multiples of 10, -2 rounds to multiples of 100, and so on. Arbitrary base values may be chosen, the algorithm applies the same multiplicative principle. Rounding cell values to multiples of a base n may be used to generalize raster layers. The algorithm preserves the data type of the input raster. Therefore byte/integer rasters can only be rounded to multiples of a base n, otherwise a warning is raised and the raster gets copied as byte/integer raster
qgis_roundrastervalues(
INPUT = qgisprocess:::qgis_default_value(),
BAND = qgisprocess:::qgis_default_value(),
ROUNDING_DIRECTION = qgisprocess:::qgis_default_value(),
DECIMAL_PLACES = qgisprocess:::qgis_default_value(),
BASE_N = 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()
)
raster
- Input raster. Path to a raster layer.
band
- Band number. Integer value representing an existing raster band number.
enum
of ("Round up", "Round to nearest", "Round down")
- Rounding direction. Number of selected option, e.g. '1'. Comma separated list of options, e.g. '1,3'.
number
- Number of decimals places. 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.
number
- Base n for rounding to multiples of n. 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 raster. 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
.