Skip to content

HillshadeProcessor

Bases: IDMixin

Tiles processor that computes the hillshade from a channel or channels

Experimental

HillshadeProcessor is experimental since 1.3.0 and may change without notice.

Notes
  • Requires a raster channel

Implements the TilesProcessor protocol.

PARAMETER DESCRIPTION
channel_name

Channel name

TYPE: ChannelName | str DEFAULT: ChannelName.DEM

slope_channel_name

Channel name of the slope channel

TYPE: ChannelName | str | None DEFAULT: None

aspect_channel_name

Channel name of the aspect channel

TYPE: ChannelName | str | None DEFAULT: None

azimuth

Angle to north of the light source in degrees

TYPE: float DEFAULT: 315.0

altitude

Angle to the horizontal plane of the light source in degrees

TYPE: float DEFAULT: 45.0

new_channel_name

New channel name

TYPE: ChannelName | str DEFAULT: ChannelName.HILLSHADE

max_num_threads

Maximum number of threads

TYPE: int | None DEFAULT: None

id property

RETURNS DESCRIPTION
uuid.UUID

ID

from_config classmethod

Creates a hillshade processor from the configuration.

PARAMETER DESCRIPTION
config

Configuration

TYPE: HillshadeProcessorConfig

RETURNS DESCRIPTION
HillshadeProcessor

Hillshade processor

__call__

Computes the hillshade from the channel or channels.

PARAMETER DESCRIPTION
tiles

Tiles

TYPE: Tiles

RETURNS DESCRIPTION
Tiles

Tiles


HillshadeProcessorConfig

Bases: pydantic.BaseModel

Configuration for the from_config class method of HillshadeProcessor

Create the configuration from a config file
  • Use null instead of None
Usage

You can create the configuration from a config file.

config.yaml
package: 'aviary'
name: 'HillshadeProcessor'
config:
  channel_name: 'dem'
  azimuth: 315.
  altitude: 45.
  new_channel_name: 'hillshade'
  max_num_threads: null
ATTRIBUTE DESCRIPTION
channel_name

Channel name - defaults to 'dem'

TYPE: ChannelName | str

slope_channel_name

Channel name of the slope channel - defaults to None

TYPE: ChannelName | str | None

aspect_channel_name

Channel name of the aspect channel - defaults to None

TYPE: ChannelName | str | None

azimuth

Angle to north of the light source in degrees - defaults to 315.

TYPE: float

altitude

Angle to the horizontal plane of the light source in degrees - defaults to 45.

TYPE: float

new_channel_name

New channel name - defaults to 'hillshade'

TYPE: ChannelName | str

max_num_threads

Maximum number of threads - defaults to None

TYPE: int | None