qgis_function function

Create a wrapper function that runs one algorithm

Create a wrapper function that runs one algorithm

As opposed to qgis_run_algorithm(), qgis_function() creates a callable function based on the argument metadata provided by qgis_get_argument_specs().

qgis_function(algorithm, ...)

Arguments

  • algorithm: A qualified algorithm name (e.g., "native:buffer").
  • ...: Algorithm arguments. These values are evaluated once and immediately, so you shouldn't call qgis_tmp_file() here.

Returns

A function.

Details

The logic of qgis_function() has been implemented in R package qgis. This package also provides the QGIS documentation of each processing algorithm as corresponding R function documentation.

Examples

qgis_buffer <- qgis_function("native:buffer") qgis_buffer( system.file( "longlake/longlake_depth.gpkg", package = "qgisprocess" ), DISTANCE = 10 )