Description Usage Arguments Author(s) Examples
The function saves spatial objects (sp
, sf
and raster
) to
a temporary folder on the computer's hard drive.
1 | save_spatial_objects(params, type_name, NA_flag = -99999)
|
params |
A parameter-argument list as returned by |
type_name |
A character string containing the QGIS parameter type for
each parameter (boolean, multipleinput, extent, number, etc.) of |
NA_flag |
Value used for NAs when exporting raster objects. |
Jannes Muenchow
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ## Not run:
library("RQGIS")
library("raster")
library("reticulate")
r <- raster(ncol = 100, nrow = 100)
r1 <- crop(r, extent(-10, 11, -10, 11))
r2 <- crop(r, extent(0, 20, 0, 20))
r3 <- crop(r, extent(9, 30, 9, 30))
r1[] <- 1:ncell(r1)
r2[] <- 1:ncell(r2)
r3[] <- 1:ncell(r3)
alg <- "grass7:r.patch"
out <- py_run_string(sprintf("out = RQGIS.get_args_man('%s')", alg))$out
params <- get_args_man(alg)
params$input <- list(r1, r2, r3)
params[] <- save_spatial_objects(params = params,
type_name = out$type_name)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.