tang_curvature: Calculate tangential curvature.

Description Usage Arguments Value Examples

Description

Calculate tangential curvature.

Usage

1
tang_curvature(x, ..., res_m)

Arguments

x

A numeric vector of length 9, i.e., the 8 cells plus the center of a 3 x 3 square grid.

...

Not used, but required so that tang_curvature can be used as function argument to raster::focal

Value

A numeric value in the range [-1, 1] with a sign that ensures that positive curvature equates to convex forms and negative curvature equates to concave forms

Examples

1
2
3
4
if (require(raster, quietly = TRUE)) {
    x <- raster::raster(matrix(1:36, ncol = 6), xmn=0, xmx=1, ymn=0, ymx=1)
    tcurv <- raster::focal(x, w = matrix(1, 3, 3), fun = tang_curvature, pad = TRUE, padValue = NA, res_m = raster::xres(x))
}

dschlaep/ecotoner documentation built on May 15, 2019, 2:57 p.m.