geo-registry

Slope

The steepness of each cell of an elevation raster, in degrees or percent.

Pitfall. Elevations in feet over a grid in metres, or a grid in degrees, give badly wrong slopes unless the z unit is set.
About this operation
Also called gradient, steepness, gdaldem slope
Group raster/terrain
Checks crs.geographic, raster.nodata
Pitfalls 1 listed above
Columbus tool raster_op · slope
Notes Not stated
Status active
Broader Not stated
Narrower Not stated
Related

Parameters

Name Type Required Default Values Note
z_unit enum yes Not stated m, ft, us-ft Unit of the elevation values.
units enum no Not stated degrees, percent Not stated
band integer no Not stated Not stated Not stated

Inputs and outputs

Direction Name Type Geometry Note
Input raster raster Not stated An elevation model.
Output output raster Not stated Not stated

In each engine

Engine Tool Parameters Differences
gdal gdal raster slope
  • z_unit always crs-units. Elevation is taken in the CRS's horizontal units; otherwise set xscale and yscale (see GDAL's page).
  • units → unit : degrees = degree; percent = percent
  • band → band
  • raster → input
  • output → output
  • Cells on the raster's edge are computed from incomplete neighbourhoods; on a uniform slope they come out lower, and differently from PostGIS's. --no-edges leaves them as nodata.
grass r.slope.aspect
  • z_unit always crs-units. Elevation is taken in the project's horizontal units; otherwise set zscale.
  • units → format : degrees = degrees; percent = percent
  • raster → elevation
  • output → slope
  • The same module writes aspect (and curvatures) when those outputs are named; its aspect convention differs from compass bearings unless -n is set.
postgis-raster st_slope
  • z_unit always crs-units. Elevation is taken in the CRS's horizontal units; otherwise set scale (see the PostGIS page).
  • units → units : degrees = DEGREES; percent = PERCENT
  • band → nband
  • raster → rast
  • Cells on the raster's edge are computed from incomplete neighbourhoods; on a uniform slope they come out lower, and differently from GDAL's.
qgis native:slope
  • z_unit always crs-units. Elevation is taken in the CRS's horizontal units; otherwise set Z_FACTOR.
  • units always degrees
  • raster → INPUT
  • output → OUTPUT
None noted
terra terra::terrain
  • z_unit always crs-units. Elevation must be in the map units, or metres when the CRS is longitude/latitude.
  • units → unit : degrees = degrees. not supported: percent. unit is degrees or radians.
  • raster → x
  • The same function gives aspect, TPI, TRI, roughness and flow direction (v = "aspect", ...).
Preset: {"v":"slope"}
whiteboxtools Slope
  • z_unit always crs-units. Elevation is taken in the CRS's horizontal units; otherwise set zfactor.
  • units → units
  • raster → dem
  • output → output
None noted
xarray-spatial xrspatial.slope
  • z_unit always crs-units. With the default method = 'planar', elevations must be in the same units as the cell size; z_unit applies only with method = 'geodesic'.
  • units always degrees
  • raster → agg
  • Takes an xarray DataArray with x and y coordinates; edge cells are NaN by default (boundary = 'nan').