qgis_result_status function

Access processing results: extra tools

Access processing results: extra tools

A qgis_result object is a list that, next to the output elements, also contains other elements that can be useful in scripting. Several of these can be extracted with convenience functions: the exit status of the process, standard output and standard error of 'qgis_process', arguments passed to 'qgis_process'.

qgis_result_status(x) qgis_result_stdout(x) qgis_result_stderr(x) qgis_result_args(x)

Arguments

  • x: A qgis_result object returned by qgis_run_algorithm().

Returns

  • A number in case of qgis_result_status().
  • A string in case of qgis_result_stdout() and qgis_result_stderr().
  • A list in case of qgis_result_args().

Examples

result <- qgis_run_algorithm( "native:buffer", INPUT = system.file("longlake/longlake_depth.gpkg", package = "qgisprocess"), DISTANCE = 10 ) qgis_result_status(result) stdout <- qgis_result_stdout(result) cat(substr(stdout, 1, 335)) qgis_result_stderr(result) qgis_result_args(result)

See Also

Other topics about programming or debugging utilities: qgis_run(), qgis_tmp_file(), qgis_unconfigure(), qgis_using_json_input()

Other topics about accessing or managing processing results: qgis_as_raster(), qgis_as_terra(), qgis_clean_result(), qgis_extract_output(), st_as_sf, st_as_stars