Calculates slope aspect (i.e., slope orientation in degrees clockwise from north) for each grid cell in an input DEM.
Arguments
- dem
Raster object of class WhiteboxRaster. See
wbw_read_raster()
for more details.- z_factor
double
, Z conversion factor is only important when the vertical and horizontal units are not the same in the DEM. When this is the case, the algorithm will multiply each elevation in the DEM by the Z conversion factor
Value
WhiteboxRaster object containing aspect in degrees
Details
For DEMs in projected coordinate systems, the tool uses the 3rd-order bivariate Taylor polynomial method described by Florinsky (2016). Based on a polynomial fit of elevations within the 5x5 neighborhood surrounding each cell, this method is more robust against outlier elevations (noise) than other methods.
For DEMs in geographic coordinate systems (i.e., angular units), the tool uses the 3x3 polynomial fitting method for equal angle grids also described by Florinsky (2016).
References
Gallant, J. C., and J. P. Wilson, 2000, Primary topographic attributes, in Terrain Analysis: Principles and Applications, edited by J. P. Wilson and J. C. Gallant pp. 51-86, John Wiley, Hoboken, N.J.
Florinsky, I. (2016). Digital terrain analysis in soil science and geology. Academic Press.
For more information, see https://www.whiteboxgeo.com/manual/wbw-user-manual/book/tool_help.html#aspect
Examples
f <- system.file("extdata/dem.tif", package = "wbw")
wbw_read_raster(f) |>
wbw_aspect()
#> +-----------------------------------------------+
#> | WhiteboxRaster |
#> | Aspect |
#> |...............................................|
#> | bands : 1 |
#> | dimensions : 726, 800 (nrow, ncol) |
#> | resolution : 5.002392, 5.000243 (x, y) |
#> | EPSG : 2193 (Linear_Meter) |
#> | extent : 1925449 1929446 5582091 5585717 |
#> | min value : -1.000000 |
#> | max value : 359.999481 |
#> +-----------------------------------------------+