export_gis | R Documentation |
Exports points, buffers and intersections between buffers and rasterlayers, as shapefiles and raster files.
export_gis(
x,
raster = NULL,
points = NULL,
radii = NULL,
ext_raster = NULL,
dir = getwd(),
filenames = c("points", "buffers", "lsm_raster", "ext_raster"),
overwrite = FALSE,
filetype = c("ESRI Shapefile", "GTiff"),
gdal = c("COMPRESS=DEFLATE", "PREDICTOR=2", "ZLEVEL=9"),
...
)
x |
An object of class 'MultiLand' generated with |
raster, ext_raster |
Numeric. The rasterlayers to be exported. |
points |
Numeric or character vector of points to be processed. See Details. |
radii |
Numeric vector of radii to be processed. |
dir |
Character. Name of the target directory where files will be exported. Provide a string with an existing folder, otherwise the function will create it. |
filenames |
Character vector with the root of the file names to be exported, for points, buffers, main rasterlayers and extra rasters, respectively. Default is c("points", "buffers", "lsm_raster", "ext_raster"). |
overwrite |
Logical. Whether to overwrite (TRUE) or not (FALSE, default) existing files with the same names. |
filetype |
Character. File format expressed as GDAL driver names (Vector Drivers, Raster drivers). Default are c("ESRI Shapefile", "GTiff") for points/rasters and raster intersections, respectively. |
gdal |
GDAL driver specific datasource creation options. See the GDAL documentation. With the
GeoTiff file format, |
... |
Other arguments passed to terra::writeRaster. |
If argument points
is a character vector,
export_gis()
will assume that the 'MultiLand' object inputted in argument x
was created with
site_ref = TRUE
. This is, there is an attribute in points layer data with the names for
each individual point. Therefore, the inputted values in argument points
will be taken as these
identification names. Otherwise, if a numeric vector is declared, the inputted values
will be taken as the automatically generated point ids (created when running mland()
).
No return of an R object. GIS data from a 'MultiLand' object is exported.
mland()
## Not run:
# Loads a 'MultiLand' object
ernesdesign <- system.file("extdata", "ernesdesign.zip", package = "multilandr")
ernesdesign <- load_mland(ernesdesign)
# Exports as GIS data
export_gis(ernesdesign, dir = "ernesdesign")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.