calcHyps: Calculate Hypsography

View source: R/calcHyps.R

calcHypsR Documentation

Calculate Hypsography

Description

Calculates area at each depth for a given waterbody.

Usage

calcHyps(DEM, DEMunits = "m", depthUnits = "ft", by = 1, output = "values")

Arguments

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"

Value

data frame of areas at each depth unit ("values") or a hypsography plot ("plot")

Author(s)

Tristan Blechinger, Department of Zoology & Physiology, University of Wyoming

Examples

#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')

rLakeHabitat documentation built on April 16, 2025, 1:10 a.m.