hillshade
- eolab.georastertools.processing.algo.hillshade(input_data: ndarray, elevation: float = 0.0, azimuth: float = 0.0, radius: int = 8, resolution: float = 0.5) ndarray[source]
Computes a mask of cast shadows in a Digital Elevation Model (DEM).
This function calculates the shadows based on the specified elevation and azimuth angles, and returns a mask indicating where shadows are cast.
- Parameters:
input_data (np.ndarray) – A 3D numpy array of shape (1, number_of_lines, number_of_columns) containing the Digital Elevation Model (DEM). The function only accepts arrays with one band.
elevation (float) – The angle (in degrees) between the horizon and the line of sight from an observer to the satellite.
azimuth (float) – The angle (in degrees) between true north and the projection of the satellite’s position onto the horizontal plane, measured in a clockwise direction.
radius (int) – The radius around each pixel to consider when calculating shadows.
resolution (float) – The spatial resolution of the input data, used for scaling calculations.
- Returns:
- A boolean numpy array of the same size as input_data, indicating the mask of cast shadows,
where True represents shadowed areas and False represents illuminated areas.
- Return type:
np.ndarray
- Raises:
ValueError – If the input_data does not have 3 dimensions or if the first dimension is not of size 1.