raster_tools.surface.slope#

raster_tools.surface.slope(raster, degrees=True)[source]#

Calculates the slope (degrees) of each raster cell for each raster band.

The approach is based on ESRI’s degree slope calculation.

Parameters
  • raster (Raster or path str) – The raster to perform the calculation on (typically an elevation surface).

  • degrees (bool) – Indicates whether to output as degrees or percent slope values. Default is True (degrees).

Returns

The resulting raster of slope values (degrees or percent). The bands will have the same shape as the original Raster.

Return type

Raster

References