authority: folia
slug: slope
name: Slope
domain: land
subdomain: topography
authority_id: folia:slope
parent: elevation
external_ids:
  cf_standard_name: null
canonical_units: degree
external_validations:
  gdal:
    tool: gdaldem
    algorithm: slope
    docs_url: https://gdal.org/programs/gdaldem.html#slope
  qgis:
    algorithm_id: native:slope
    docs_url: https://docs.qgis.org/latest/en/docs/user_manual/processing_algs/qgis/rasterterrainanalysis.html#slope
  gee:
    op: ee.Terrain.slope
    docs_url: https://developers.google.com/earth-engine/apidocs/ee-terrain-slope
description: |
  Rate of change of elevation with horizontal distance, expressed as
  degrees from horizontal (0-90) or percent rise. Computed per-pixel
  from a DEM using a 3x3 neighbourhood — Horn (1981) is the default
  algorithm in GDAL, QGIS, and Earth Engine. Used by hydrology,
  hazard, accessibility, and ecology ops.
theme: terrain
consumed_by: []
produced_by:
  - terrain_slope
demos: []
status: documented
example_recipes:
  - title: "Slope from Copernicus DEM 30m via GDAL"
    tool: gdal
    requires: [elevation]
    fixture: copernicus-dem-glo30-iberia-100km
    command: |
      gdaldem slope -compute_edges dem.tif slope.tif
    docs_url: https://gdal.org/programs/gdaldem.html#slope
  - title: "Slope via Earth Engine ee.Terrain.slope"
    tool: gee
    requires: [elevation]
    fixture: copernicus-dem-glo30-iberia-100km
    snippet: |
      var dem = ee.Image('COPERNICUS/DEM/GLO30').select('DEM');
      var slope = ee.Terrain.slope(dem);
    docs_url: https://developers.google.com/earth-engine/apidocs/ee-terrain-slope
sources:
  - https://gdal.org/programs/gdaldem.html#slope
  - Horn, B.K.P. 1981, Proceedings of the IEEE 69, 14-47 (Hill shading and the reflectance map)
