This function takes the USGS NED (National Elevation Dataset) or SRTM (Shuttle Radar Topography Mission) and gets a handful of terrain indices. This is good for downloaded areas for further analysis or passing on for some quick stats.
get_terrain(
aoi,
method = "NED",
param = "slope",
mask = FALSE,
m.low = NULL,
m.high = NULL,
az = 270,
el = 45
)
A sf object indicating the extent of the geom.
character
indicating what method to use, e.g. 'NED', 'SRTM'.
character
indicating terrain type, e.g. 'dem', 'FA', 'TWI', 'TRI', 'TPI', 'aspect', 'slope', 'cos', 'sin', 'hillshade', 'complete'.
logical
whether to mask out certain ranges
numeric
low value for mask, e.g. greater than 'm.low'
numeric
high value for mask, e.g. less than 'm.high'
numeric
The illumination azimuth in degrees from north.
numeric
The illumination elevation in degrees.
A list of Earth Engine Objects and arguments.
if (FALSE) {
# Load Libraries
library(rgee)
rgee::ee_intialize()
library(exploreRGEE)
# Bring in data
huc <- exploreRGEE::huc
# get terrain
twi <- get_terrain(huc, method = 'NED', param = 'TWI')
}