Learn R Programming

spatialEco (version 0.1-5)

trig.trans: Calculates the trigonomic slope and aspect transformation

Description

The trigonomic Stage (1978) slope * cos(aspect) or slope * sin(aspect)

Usage

trig.trans(slope, aspect, type = "cos", slp.units = "degrees", asp.units = "degrees")

Arguments

slope
slope values in degrees, radians or percent
aspect
aspect values in degrees or radians
type
Type of transformation, options are: "cos", "sin",
slp.units
Units of slope values, options are: "degrees", "radians" or "percent"
asp.units
Units of aspect values, options are: "degrees" or "radians"

Value

A vector of the modeled value

References

Stage, A. R. 1976. An Expression of the Effects of Aspect, Slope, and Habitat Type on Tree Growth. Forest Science Vol 22, No 3, 457-460.

Examples

Run this code
 trig.trans(slope = 48.146, aspect = 360.000)

 library(raster)
 elev <- getData('alt', country='CHE')
 sa <- terrain(elev, opt=c("slope", "aspect"), unit="degrees")
 scosa <- overlay(sa[[1]], sa[[2]], fun = trig.trans)

Run the code above in your browser using DataLab