QGIS Algorithm provided by QGIS (native c++) Raster surface volume (native:rastersurfacevolume). Calculates the volume under a raster grid's surface. This algorithm calculates the volume under a raster grid's surface. Several methods of volume calculation are available, which control whether only values above or below the specified base level are considered, or whether volumes below the base level should be added or subtracted from the total volume. The algorithm outputs the calculated volume, the total area, and the total number of pixels analysed. If the 'Count Only Above Base Level' or 'Count Only Below Base Level' methods are used, then the calculated area and pixel count only includes pixels which are above or below the specified base level respectively. Units of the calculated volume are dependent on the coordinate reference system of the input raster file. For a CRS in meters, with a DEM height in meters, the calculated value will be in meters³. If instead the input raster is in a geographic coordinate system (e.g. latitude/longitude values), then the result will be in degrees² × meters, and an appropriate scaling factor will need to be applied in order to convert to meters³.

qgis_rastersurfacevolume(
  INPUT = qgisprocess:::qgis_default_value(),
  BAND = qgisprocess:::qgis_default_value(),
  LEVEL = qgisprocess:::qgis_default_value(),
  METHOD = qgisprocess:::qgis_default_value(),
  OUTPUT_HTML_FILE = qgisprocess:::qgis_default_value(),
  OUTPUT_TABLE = qgisprocess:::qgis_default_value(),
  ...,
  .complete_output = .complete_output_option(),
  .quiet = .quiet_option(),
  .messages = .message_option()
)

Arguments

INPUT

raster - Input layer. Path to a raster layer.

BAND

band - Band number. Integer value representing an existing raster band number.

LEVEL

number - Base level. 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.

METHOD

enum of ("Count Only Above Base Level", "Count Only Below Base Level", "Subtract Volumes Below Base Level", "Add Volumes Below Base Level") - Method. Number of selected option, e.g. '1'. Comma separated list of options, e.g. '1,3'.

OUTPUT_HTML_FILE

fileDestination - Surface volume report. Path for new file.

OUTPUT_TABLE

sink - Surface volume table. Path for new vector 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

  • AREA - outputNumber - Area

  • OUTPUT_HTML_FILE - outputHtml - Surface volume report

  • OUTPUT_TABLE - outputVector - Surface volume table

  • PIXEL_COUNT - outputNumber - Pixel count

  • VOLUME - outputNumber - Volume