Topographic Features#

rforge.library.processes.topography.aspect(dem: Layer | ndarray, units: str = 'degrees', alpha: Layer | ndarray | None = None, as_array: bool = False) ndarray | Layer[source]#

Calculate the aspect of a terrain slope based on a Digital Elevation Model (DEM).

Parameters:
  • dem – Digital elevation model data representing the terrain.

  • units – Units for computing the slope. Can be ‘degrees’ or ‘radians’.

  • alpha – Alpha layer. Defaults to None.

  • as_array – If True, return the result as a Numpy array. Defaults to False.

Returns:

Aspect map in the desired unit.

rforge.library.processes.topography.slope(dem: Layer | ndarray, units: str = 'degrees', alpha: Layer | ndarray | None = None, as_array: bool = False) ndarray | Layer[source]#

Calculate the slope of a terrain based on a Digital Elevation Model (DEM).

Parameters:
  • dem – Digital elevation model data representing the terrain.

  • units – Units for computing the slope. Can be ‘degrees’ or ‘radians’.

  • alpha – Alpha layer. Defaults to None.

  • as_array – If True, return the result as a Numpy array. Defaults to False.

Returns:

Slope map in the desired unit.

Raises:

TypeError – If inputs are not of the accepted type.