raster_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 rasters and imports them into the current GRASS mapset.

Usage

raster_to_mapset(
  rasters,
  as_integer = rep(FALSE, length(rasters)),
  overwrite = FALSE,
  max_memory = 300,
  ...
)

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.

...

Additional arguments to r.import.

Value

A vector of raster layer names in the GRASS mapset.

Examples

 
# Will only run if a GRASS session is initialised
if(check_running()){
   dem <- system.file("extdata", "dem.tif", package = "rdwplus")
   raster_to_mapset(dem)
}

[Package rdwplus version 1.0.0 Index]