qgis_function: Create a wrapper function that runs one algorithm

View source: R/qgis-function.R

qgis_functionR Documentation

Create a wrapper function that runs one algorithm

Description

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

Usage

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.

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.

Value

A function.

Examples


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


qgisprocess documentation built on Aug. 17, 2023, 5:14 p.m.