View source: R/compat-raster.R
qgis_as_raster | R Documentation |
Convert a qgis_result object or one of its elements to a raster object
qgis_as_raster(x, ...)
qgis_as_brick(x, ...)
## S3 method for class 'qgis_outputRaster'
qgis_as_raster(x, ...)
## S3 method for class 'qgis_outputRaster'
qgis_as_brick(x, ...)
## S3 method for class 'qgis_outputLayer'
qgis_as_raster(x, ...)
## S3 method for class 'qgis_outputLayer'
qgis_as_brick(x, ...)
## S3 method for class 'qgis_result'
qgis_as_raster(x, ...)
## S3 method for class 'qgis_result'
qgis_as_brick(x, ...)
x |
A |
... |
Arguments passed to |
A RasterLayer
or a RasterBrick
object.
Other topics about coercing processing output:
qgis_as_terra()
,
st_as_sf
,
st_as_stars
Other topics about accessing or managing processing results:
qgis_as_terra()
,
qgis_clean_result()
,
qgis_extract_output()
,
qgis_result_status()
,
st_as_sf
,
st_as_stars
# not running below examples in R CMD check to save time
result <- qgis_run_algorithm(
"native:slope",
INPUT = system.file("longlake/longlake_depth.tif", package = "qgisprocess")
)
# most direct approach, autoselecting a `qgis_outputRaster` type
# output from the `result` object and reading as RasterLayer:
qgis_as_raster(result)
# if you need more control, extract the needed output element first:
output_raster <- qgis_extract_output(result, "OUTPUT")
qgis_as_raster(output_raster)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.