hillshade

Contents

hillshade#

hillshade(xds: str | CloudPath | Path | tuple[ndarray | MaskedArray, dict] | DataArray | Dataset | DatasetReader | DatasetWriter, azimuth: float = 315, zenith: float = 45, **kwargs) DataArray | Dataset[source]#

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

Goal: replace gdaldem CLI

NB: altitude = zenith

References:

Parameters:
  • xds (AnyRasterType) – Path to the DEM, its dataset, its xarray or a tuple containing its array and metadata

  • azimuth (float) – Azimuth of the light, in degrees. 0 if it comes from the top of the raster, 90 from the east, …

  • zenith (float) – Zenith angle in degrees

Returns:

Hillshade

Return type:

AnyXrDataStructure