sertit.rasters.hillshade

hillshade(xds: Union[str, xarray.core.dataarray.DataArray, xarray.core.dataset.Dataset, rasterio.io.DatasetReader], azimuth: float = 315, zenith: float = 45) Union[xarray.core.dataset.Dataset, xarray.core.dataarray.DataArray][source]

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

Goal: replace gdaldem CLI (https://gdal.org/programs/gdaldem.html)

NB: altitude = zenith

Reference: - https://www.neonscience.org/resources/learning-hub/tutorials/create-hillshade-py - http://webhelp.esri.com/arcgisdesktop/9.2/index.cfm?TopicName=How%20Hillshade%20works

Parameters
  • xds (PATH_XARR_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

Returns

Hillshade

Return type

XDS_TYPE