Learn R Programming

geodiv (version 1.1.0)

sa: Calculates the Average Roughness of a Surface

Description

Finds the average roughness of a surface (Sa) as the absolute deviation of surface heights from the mean surface height. Height is measured as the value of a raster and may not necessarily represent actual height.

Usage

sa(x)

Value

A value of average roughness in the units of the original raster or matrix.

Arguments

x

A raster or matrix.

Examples

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

# find the surface roughness
roughness <- sa(normforest)

Run the code above in your browser using DataLab