stxr: Estimate Texture Aspect Ratio

View source: R/aacf.R

stxrR Documentation

Estimate Texture Aspect Ratio

Description

Calculates the texture aspect ratio (Str) at defined autocorrelation values. The texture aspect ratio is the ratio of the fastest to the slowest decay lengths of the autocorrelation function to the defined autocorrelation values.

Usage

stxr(x, threshold = c(0.2, 1/exp(1)))

Arguments

x

A raster or matrix.

threshold

A vector of autocorrelation values with values between 0 and 1. Indicates the autocorrelation value(s) to which the rates of decline are measured.

Value

A vector with length equal to that of threshold containing the texture aspect ratio(s) for the input autocorrelation value(s).

Examples

# import raster image
data(normforest)
normforest <- terra::unwrap(normforest)

# estimate the texture aspect ratio for autocorrelation
# thresholds of 0.20 and 0.37 (1/e)
strvals <- stxr(normforest, threshold = c(0.20, 1 / exp(1)))

# calculate Str20, the texture aspect ratio for
# autocorrelation value of 0.2 in the AACF
Str20 <- strvals[1]

geodiv documentation built on Oct. 6, 2023, 1:07 a.m.