View source: R/radiationtools.R
mean_slope | R Documentation |
mean_slope
is used to calculates the mean slope to the horizon in all directions.
mean_slope(dtm, steps = 36, reso = 100)
dtm |
a SpatRaster object, two-dimensional array or matrix of elevations (m). |
steps |
an optional integer. The mean slope is calculated from the horizon angle in specified directions. Steps defines the total number of directions used. If the default 36 is specified, then the horizon angle is calculated at 10º intervals. |
reso |
a single numeric value representing the spatial resolution of |
If dtm
is a SpatRaster object, a SpatRaster object is returned.
The projection system associated with dtm
must be such that
units of x, y and z are identical. Use terra::project()
to convert the
projection to a Universal Transverse Mercator type projection system.
a SpatRaster object or a two-dimensional array of the mean slope angle to the horizon in all directions (º).
library(terra)
ms <- mean_slope(rast(dtm100m), reso = 100)
plot(ms, main = "Mean slope to horizon")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.