vector_to_mapset {rdwplus} | R Documentation |
Import rasters into GRASS mapset
Description
GRASS can only deal with raster and vector data in a GRASS mapset. This function takes external vectors and imports them into the current GRASS mapset.
Usage
vector_to_mapset(vectors, overwrite = FALSE, ...)
Arguments
vectors |
A character vector of filenames of shapefiles to import. |
overwrite |
A logical indicating whether the overwrite flag should be used. Defaults to |
... |
Additional arguments to |
Value
A vector of vector layer names in the GRASS mapset.
Examples
# Will only run if GRASS is running
if(check_running()){
# Load data set
dem <- system.file("extdata", "dem.tif", package = "rdwplus")
stream_shp <- system.file("extdata", "streams.shp", package = "rdwplus")
# Set environment parameters
set_envir(dem)
# Import vector data to mapset
vector_to_mapset(vectors = stream_shp)
}
[Package rdwplus version 1.0.0 Index]