Description Usage Arguments Details Value Note Author(s) Examples
get_args_man
retrieves automatically function arguments and
respective default values for a given QGIS geoalgorithm.
1 | get_args_man(alg = "", options = TRUE, qgis_env = set_env())
|
alg |
The name of the algorithm for which one wishes to retrieve arguments and default values. |
options |
Sometimes one can choose between various options for a
function argument. Setting option to |
qgis_env |
Environment containing all the paths to run the QGIS API. For
more information, refer to |
get_args_man
basically mimics the behavior of the QGIS GUI. That
means, for a given GIS algorithm, it captures automatically all arguments
and default values. In the case that a function argument has several
options, one can indicate to use the first option (see also
get_options()
), which is the QGIS GUI default behavior.
The function returns a list whose names correspond to the function
arguments one needs to specify. The list elements correspond to the
argument specifications. The specified function arguments can serve as
input for run_qgis()
's params argument. Please note that although
get_args_man
tries to retrieve default values, one still needs to specify
some function arguments manually such as the input and the output layer.
Please note that some default values can only be set after the user's
input. For instance, the GRASS region extent will be determined
automatically by run_qgis()
if left blank.
Jannes Muenchow, Victor Olaya, QGIS core team
1 2 3 4 5 6 | ## Not run:
get_args_man(alg = "qgis:addfieldtoattributestable")
# and using the option argument
get_args_man(alg = "qgis:addfieldtoattributestable", options = TRUE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.