View source: R/vector_to_mapset.R
vector_to_mapset | R Documentation |
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.
vector_to_mapset(vectors, overwrite = FALSE, ...)
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 |
A vector of vector layer names in the GRASS mapset.
# 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)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.