Learn R Programming

geodiv (version 1.1.0)

sq: Calculates the Root Mean Square Roughness of a Surface

Description

Finds the root mean square roughness of a surface (Sq) as the standard 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

sq(x)

Value

A value of root mean square 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 <- sq(normforest)

Run the code above in your browser using DataLab