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 = 1)
dtm |
a raster 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 raster object, a raster object is returned.
The projection system associated with dtm
must be such that
units of x, y and z are identical. Use projectRaster()
to convert the
projection to a Universal Transverse Mercator type projection system.
a raster object or a two-dimensional array of the mean slope angle to the horizon in all directions (º).
library(raster)
ms <- mean_slope(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.