xdem.DEM.roughness

Contents

xdem.DEM.roughness#

DEM.roughness(window_size=3, mp_config=None)[source]#

Calculates the roughness, the maximum difference between neighbouring pixels, for any window size. Output is in the unit of the DEM (typically meters).

Based on: Dartnell (2000), https://environment.sfsu.edu/node/11292.

Parameters:
  • window_size (int) – The size of the window for deriving the metric.

  • mp_config (MultiprocConfig | None) – Multiprocessing configuration, run the function in multiprocessing if not None.

  • engine – Engine to use for computing the attribute, “scipy” or “numba”.

Raises:

ValueError – If the inputs are poorly formatted.

Return type:

TypeVar(RasterType, bound= Raster)