qgis_using_json_input | R Documentation |
Returns a logical that reveals whether the JSON input and output methods are used, respectively.
qgis_using_json_input()
qgis_using_json_output(query = FALSE, quiet = TRUE)
query |
Logical.
Should the outcome of
|
quiet |
Use |
Since QGIS 3.24 the JSON input method of 'qgis_process' is used by default
when calling the command.
It allows to use certain algorithms that
require a more complex input argument, e.g. a list of lists (see
qgis_list_input()
).
Likewise, JSON output is the default output format requested from 'qgis_process'. Using the JSON input method of 'qgis_process' automatically implies using the JSON output method; when not using the JSON input method it is possible (but not the default) to also not use the JSON output method.
The defaults can be overruled with the options
qgisprocess.use_json_input
or qgisprocess.use_json_output
, and with the
environment variables R_QGISPROCESS_USE_JSON_INPUT
or
R_QGISPROCESS_USE_JSON_OUTPUT
.
The returned JSON output method is always
cached during the current session by qgis_using_json_output()
.
Given that qgis_using_json_output()
is called by various functions
in the package, having a user setting 'use_json_output' in place (see above)
will have effect during subsequent usage of the package.
To cache the value between sessions, qgis_configure()
needs to be called
to update the value stored in the persistent package cache file.
The JSON input method is not cached but simply determined on the fly, based on QGIS version, the JSON output method and the user setting if present.
There is good reason for having 'use_json_output' in the persistent package
cache: the values of qgis_algorithms()
and qgis_plugins()
are different
with or without the JSON output method, and are also stored in the cache.
A logical of length 1.
Other topics about programming or debugging utilities:
qgis_result_status()
,
qgis_run()
,
qgis_tmp_file()
,
qgis_unconfigure()
Other topics about reporting the QGIS state:
has_qgis()
,
qgis_algorithms()
,
qgis_path()
qgis_using_json_input()
qgis_using_json_output()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.