calcHyps | R Documentation |
Calculates area at each depth for a given waterbody.
calcHyps(DEM, DEMunits = "m", depthUnits = "ft", by = 1, output = "values")
DEM |
SpatRaster object of a given waterbody, rasters can be transformed to SpatRaster via the rast() function in 'terra' |
DEMunits |
character describing units of raster coordinate system. Can be meters, kilometers, or hectares ("m", "km", "ha"), default = "m" |
depthUnits |
character describing units of depth measurement. Can be either feet or meters ("ft", "m"), default = "ft" |
by |
numeric increment per unit by which volumes are calculated. Higher values will result in lower resolution. Default = 1 |
output |
character describing desired output, can either be a data frame of values ("values") or a hypsography plot ("plot"). Default = "values" |
data frame of areas at each depth unit ("values") or a hypsography plot ("plot")
Tristan Blechinger, Department of Zoology & Physiology, University of Wyoming
#load raster
DEM <- terra::rast(system.file("extdata", "example_raster.tif", package = 'rLakeHabitat'))
#run function
calcHyps(DEM, DEMunits = 'm', depthUnits = 'm', by = 1, output = 'values')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.