genStack | R Documentation |
Create a raster stack from a single raster, option to save as file.
genStack(
DEM,
by = 1,
stop = NULL,
save = TRUE,
file_name = NULL,
file_type = "COG"
)
DEM |
raster object |
by |
numeric increment per unit depth by which layers are split. Default = 1 |
stop |
optional numeric value specifying depth at which to stop stacking rasters, default = NULL |
save |
logical, save raster stack (TRUE) or not (FALSE), default = TRUE |
file_name |
character string used to name saved raster stack |
file_type |
character string defining file type to save, default = "COG" |
a raster stack of specified depth increments for a given waterbody. Raster stack is either stored as an object (save = FALSE) or written to a file in the directory (save = TRUE).
Tristan Blechinger, Department of Zoology & Physiology, University of Wyoming
#load raster
DEM <- terra::rast(system.file("extdata", "example_raster.tif", package = 'rLakeHabitat'))
#run function
genStack(DEM, by = 1, save = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.