raster_tools.surface.hillshade#

raster_tools.surface.hillshade(raster, azimuth=315, altitude=45)[source]#

Calculates the hillshade component of each raster cell for each band.

This approach is based on ESRI’s hillshade calculation.

Parameters
  • raster (Raster or path str) – The raster to perform the calculation on (typically a elevation surface).

  • azimuth (scalar) – The azimuth of the sun (degrees).

  • altitude (scalar) – The altitude of the sun (degrees).

Returns

The resulting raster of hillshade values (0-255, uint8). The bands will have the same shape as the original Raster. The null value is set to 255.

Return type

Raster

References