raster_to_mapset: Import rasters into GRASS mapset
Description
GRASS can only deal with raster and vector data in a GRASS mapset. This function takes external rasters and imports them into the current GRASS mapset.
A vector of raster layer names in the GRASS mapset.
Arguments
rasters
A character vector of filenames of rasters to import.
as_integer
A logical vector indicating whether each raster should be imported strictly in integer format. Defaults to FALSE.
overwrite
A logical indicating whether the overwrite flag should be used. If FALSE, then the corresponding raster is allowed to retain its original format. Defaults to FALSE. May cause value truncation if improperly used.
max_memory
Max memory used in memory swap mode (MB). Defaults to 300.
# Will only run if a GRASS session is initialisedif(check_running()){
dem <- system.file("extdata", "dem.tif", package = "rdwplus")
raster_to_mapset(dem)
}