Learn R Programming

simba (version 0.3-4)

aslopect: Calculate similarity of plots based on slope aspect and inclination

Description

Allows for the comparison of plots regarding the two variables slope aspect and slope inclination at once. To obtain a distance measure integrating aspect and inclination the model of a unit sphere is used and great-circle distances between virtual locations are calculated. For each plot a virtual location on the sphere is defined using the values for aspect as longitude and 90°-inclination as latitude. See details for more...

Usage

aslopect(asp, slo, names=rownames(asp), fc=FALSE, listout = FALSE)

Arguments

asp
Numeric vector with aspect values, given in degree. Expects values between 0$^\circ$ (North) and 180$^\circ$/-180$^\circ$ (South). Eastward directions count positive, westward directions count negative. Alternatively the aspect values can be given in degr
slo
Numeric vector with slope inclination values. Expects values between 0$^\circ$(flat) and 90$^\circ$ (vertical wall).
names
Plot names, defaults to the rownames of asp, but a separate vector can be specified. Its length has to match the length of asp and slo.
fc
Triggers conversion from full circle degrees to half circle degrees. Set this to TRUE if full circle degrees (from 0$^\circ$ to 360$^\circ$) are given in asp.
listout
Shall the results be given in list-format (data.frame). Defaults to FALSE which means that a matrix of class dist is returned.

Value

  • Returns a dist object or a data.frame (depending if listout = FALSE or TRUE). As a unit sphere is used, the maximum distance between two inclination/aspect pairs is perimeter/2 of the sphere which is by definition $\pi$. To scale the possible distances between 0 and 1 the results are divided by $\pi$. Thus, a great-circle distance of 1 is rather scarce in the real world, however, two vertical rock walls with opposite aspect would share it. If listout = TRUE a data.frame with the following variables returns.
  • NBXone of the compared sampling units
  • NBYthe other part of the pair
  • xThe returned aslopect value

encoding

UTF-8

Details

To obtain a distance measure integrating aspect and inclination the model of a unit sphere is used and great-circle distances between virtual locations are calculated. For each plot a virtual location on the sphere is defined using the values for aspect as longitude and 90$^\circ$-inclination as latitude. This means that as long as the inclination is low the virtual points are located in the pole region so that, regardless of aspect, plots with low inclination are rather close to each other regarding these qualities. The idea behind is, that solar radiation, wind or other factors highly depending on aspect and inclination are not really differing between plots with different aspect as long as the slope is low. The longitude values on the unit sphere are derived from the values of slope aspect. The equator of the sphere is thought as the compass circle. The Prime Meridian of the virtual sphere is the great circle through North and South of the compass. As in geographic terms longitude counts positive in Eastern and negative in Western direction. With $\phi$ = latitude = 90$^\circ$-inclination and $\lambda$ = longitude = aspect the great-circle distance between A and B can be calculated with the following formula.

$sim = \zeta =\arccos\Big(\sin(\phi_A) \cdot \sin(\phi_B) + \cos(\phi_A) \cdot \cos(\phi_B) \cdot \cos(\lambda_B - \lambda_A) \Big)$

Examples

Run this code
data(abis)
## identify columns with slope and aspect data
names(abis.env)

## calculate aslopect
abis.aslop <- aslopect(abis.env[,4], abis.env[,5])

Run the code above in your browser using DataLab