qgis_rastercalculator: QGIS algorithm - Raster calculator

View source: R/qgis_rastercalculator.R

qgis_rastercalculatorR Documentation

QGIS algorithm - Raster calculator

Description

QGIS Algorithm provided by QGIS Raster calculator (qgis:rastercalculator). This algorithm allows performing algebraic operations using raster layers. The resulting layer will have its values computed according to an expression. The expression can contain numerical values, operators and references to any of the layers in the current project. The following functions are also supported: - sin(), cos(), tan(), atan2(), ln(), log10() The extent, cell size, and output CRS can be defined by the user. If the extent is not specified, the minimum extent that covers selected reference layer(s) will be used. If the cell size is not specified, the minimum cell size of selected reference layer(s) will be used. If the output CRS is not specified, the CRS of the first reference layer will be used. The cell size is assumed to be the same in both X and Y axes. Layers are referred by their name as displayed in the layer list and the number of the band to use (based on 1), using the pattern 'layer_name@band number'. For instance, the first band from a layer named DEM will be referred as DEM@1. When using the calculator in the batch interface or from the console, the files to use have to be specified. The corresponding layers are referred using the base name of the file (without the full path). For instance, if using a layer at path/to/my/rasterfile.tif, the first band of that layer will be referred as rasterfile.tif@1.

Usage

qgis_rastercalculator(
  EXPRESSION = qgisprocess:::qgis_default_value(),
  LAYERS = qgisprocess:::qgis_default_value(),
  CELLSIZE = qgisprocess:::qgis_default_value(),
  EXTENT = qgisprocess:::qgis_default_value(),
  CRS = qgisprocess:::qgis_default_value(),
  OUTPUT = qgisprocess:::qgis_default_value(),
  ...,
  .complete_output = .complete_output_option(),
  .quiet = .quiet_option(),
  .messages = .message_option()
)

Arguments

EXPRESSION

raster_calc_expression - Expression. .

LAYERS

multilayer - Reference layer(s) (used for automated extent, cellsize, and CRS). .

CELLSIZE

number - Cell size (use 0 or empty to set it automatically). 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.

EXTENT

extent - Output extent. A comma delimited string of x min, x max, y min, y max. E.g. '4,10,101,105'. Path to a layer. The extent of the layer is used..

CRS

crs - Output CRS. CRS as an auth ID (e.g. 'EPSG:3111'). CRS as a PROJ4 string (e.g. 'PROJ4:…'). CRS as a WKT string (e.g. 'WKT:…'). Path to a layer. The CRS of the layer is used..

OUTPUT

rasterDestination - Output. Path for new raster layer.

...

further parameters passed to qgisprocess::qgis_run_algorithm()

.complete_output

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.

.quiet

logical specifying if parameter .quiet for qgisprocess::qgis_run_algorithm() Default value is TRUE.

.messages

logical specifying if messages from qgisprocess::qgis_run_algorithm() should be printed (TRUE) or not (FALSE). Default value is FALSE.

Details

Outputs description

  • OUTPUT - outputRaster - Output


JanCaha/r_package_qgis documentation built on April 4, 2024, 8:10 p.m.