compute_slope: Compute slope over a raster

View source: R/raster_computation.R

compute_slopeR Documentation

Compute slope over a raster

Description

Fits quadratic surfaces at each pixel

Usage

compute_slope(rast, win, gisbase, central = TRUE)

Arguments

rast

a 'SpatRaster' representing the raster (usually a Digital Elevation Model)

win

an odd integer (>=3) specifying the size of the computation window (in pixels)

gisbase

The directory path to GRASS binaries and libraries, containing bin and lib sub-directories among others

central

Constrain fitted surface through central window cell (default TRUE)

Details

The surfaces are parametrized as : z = ax^2 + by^2 +cxy +dx + ey + f

Slope is calculated as S = (d^2 + e^2)^0.5

the computation relies on GRASS GIS 'r.param.scale' function

Value

a gradient 'SpatRaster' (in m/m)


VincentGodard/gtbox documentation built on Sept. 4, 2022, 3:46 a.m.