hillshade(dst: Union[str, tuple,], azimuth: float = 315, zenith: float = 45) -> (<class ''>, <class 'dict'>)[source]

Compute the hillshade of a DEM from an azimuth and elevation angle (in degrees).

Goal: replace gdaldem CLI (

NB: altitude = 90 - zenith


  • It uses a 2nd order gradient instead of Horn’s or Zevenbergen & Thorne’s formula

  • z_factor is fixed to 1.0

  • scale managed by dst resolution

Reference: -

  • dst (PATH_ARR_DS) – Path to the raster, its dataset, its xarray or a tuple containing its array and metadata

  • azimuth (float) – Azimuth angle in degrees

  • zenith (float) – Zenith angle in degrees


Hillshade and its metadata

Return type

(, dict)