Skip to content

r.vector.ruggedness

Vector Ruggedness Measure

r.vector.ruggedness elevation=name [,name,...] [size=integer [,integer,...]] output=name [,name,...] [slope=name] [aspect=name] [exponent=float] [nprocs=integer] [--overwrite] [--verbose] [--quiet] [--qq] [--ui]

Example:

r.vector.ruggedness elevation=name output=name

grass.script.run_command("r.vector.ruggedness", elevation, size=3, output, slope=None, aspect=None, exponent=0, nprocs=-1, overwrite=False, verbose=False, quiet=False, superquiet=False)

Example:

gs.run_command("r.vector.ruggedness", elevation="name", output="name")

Parameters

elevation=name [,name,...] [required]
    DEM Raster Input
    GRASS raster elevation map
size=integer [,integer,...]
    Size of neighbourhood
    Size of neighbourhood to calculate the vector dispersion over. Multiple sizes are accepted to more efficiently calculate the VRM over different scales.
    Default: 3
output=name [,name,...] [required]
    Vector Ruggedness Measure Output
    Name for output raster map(s)
slope=name
    Optional slope raster map
    Optional slope raster map. If not supplied, then a slope map will be calculated internally.
aspect=name
    Optional aspect raster map
    Optional aspect raster map. If not supplied, then an aspect map will be calculated internally.
exponent=float
    Exponent for distance weighting (zero is equal weights)
    Default: 0
nprocs=integer
    The maximum number of cores to use for multiprocessing
    The maximum number of cores to use for multiprocessing. -1 uses all cores, -2 uses n_cores-1 etc.
    Default: -1
--overwrite
    Allow output files to overwrite existing files
--help
    Print usage summary
--verbose
    Verbose module output
--quiet
    Quiet module output
--qq
    Very quiet module output
--ui
    Force launching GUI dialog

elevation : str | list[str], required
    DEM Raster Input
    GRASS raster elevation map
    Used as: input, raster, name
size : int | list[int] | str, optional
    Size of neighbourhood
    Size of neighbourhood to calculate the vector dispersion over. Multiple sizes are accepted to more efficiently calculate the VRM over different scales.
    Default: 3
output : str | list[str], required
    Vector Ruggedness Measure Output
    Name for output raster map(s)
    Used as: output, raster, name
slope : str, optional
    Optional slope raster map
    Optional slope raster map. If not supplied, then a slope map will be calculated internally.
    Used as: input, raster, name
aspect : str, optional
    Optional aspect raster map
    Optional aspect raster map. If not supplied, then an aspect map will be calculated internally.
    Used as: input, raster, name
exponent : float, optional
    Exponent for distance weighting (zero is equal weights)
    Default: 0
nprocs : int, optional
    The maximum number of cores to use for multiprocessing
    The maximum number of cores to use for multiprocessing. -1 uses all cores, -2 uses n_cores-1 etc.
    Default: -1
overwrite: bool, optional
    Allow output files to overwrite existing files
    Default: False
verbose: bool, optional
    Verbose module output
    Default: False
quiet: bool, optional
    Quiet module output
    Default: False
superquiet: bool, optional
    Very quiet module output
    Default: False

DESCRIPTION

r.vector.ruggedness represents a measurement of terrain ruggedness based on the methodology conceived by Sappington et al. (2007). The measure is calculated by decomposing slope and aspect into 3-dimensional vectors, and calculating the resultant vector magnitude within a user-specified moving window size using r.neighbors. The user can specify neighborhood size to measure ruggedness across larger scales. Neighborhood operations are performed using a rectangular window shape.

MULTI-SCALE CALCULATION

The r.vector.ruggedness tool provides an efficient approach of calculating the Vector Ruggedness Measure over multiple window sizes. The size argument accepts multiple answers (as a comma separated list), which will cause the tool to reuse the same slope, aspect and vector calculations, and apply them to the neighborhood operations that calculate the vector magnitudes. By default, both the calculation of the vectors and the vector magnitudes, including over different window sizes is performed in parallel using all available cores. To restrict parallel processing, the nprocs argument can be changed to use a smaller number of processing cores. When multiple sizes are used, the output raster name is appended with the window size. Optionally, pre-calculated slope and aspect maps (in degrees) can be used in the slope and aspect arguments to save computational time if the maps are already available.

NOTES

This script was adapted from the original Sappington et al. (2007) script.

EXAMPLE

The examples are to be executed using the GRASS GIS sample North Carolina data set. To calculate the Vector Ruggedness Measure using a single neighborhood size:

    r.vector.ruggedness elevation=elevation size=3 output=vrm

For efficient calculations of the Vector Ruggedness Measure over multiple neighborhood sizes, the slope, aspect and their x, y, z vectors will be reused during the calculation. The output name will be appended with the neighborhood size in order to identify the output maps:

    r.vector.ruggedness elevation=elevation size=3,5,7,9,11 output=vrm

REFERENCES

Sappington, J.M., K.M. Longshore, and D.B. Thomson. 2007. Quantifying Landscape Ruggedness for Animal Habitat Analysis: A case Study Using Bighorn Sheep in the Mojave Desert. Journal of Wildlife Management. 71(5): 1419 -1426.

SEE ALSO

r.mapcalc, r.neighbors

AUTHOR

Steven Pawley

SOURCE CODE

Available at: r.vector.ruggedness source code (history)
Latest change: Thursday Feb 20 13:02:26 2025 in commit 53de819