Skip to content

SlopeProcessor

Bases: IDMixin

Tiles processor that computes the slope from a channel

Experimental

SlopeProcessor 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

unit

Unit of the slope (DEGREES or PERCENT)

TYPE: SlopeUnit DEFAULT: SlopeUnit.DEGREES

new_channel_name

New channel name

TYPE: ChannelName | str DEFAULT: ChannelName.SLOPE

max_num_threads

Maximum number of threads

TYPE: int | None DEFAULT: None

id property

RETURNS DESCRIPTION
uuid.UUID

ID

from_config classmethod

Creates a slope processor from the configuration.

PARAMETER DESCRIPTION
config

Configuration

TYPE: SlopeProcessorConfig

RETURNS DESCRIPTION
SlopeProcessor

Slope processor

__call__

Computes the slope from the channel.

PARAMETER DESCRIPTION
tiles

Tiles

TYPE: Tiles

RETURNS DESCRIPTION
Tiles

Tiles


SlopeProcessorConfig

Bases: pydantic.BaseModel

Configuration for the from_config class method of SlopeProcessor

Create the configuration from a config file
  • Use 'degrees' or 'percent' instead of SlopeUnit.DEGREES or SlopeUnit.PERCENT
  • Use null instead of None
Usage

You can create the configuration from a config file.

config.yaml
package: 'aviary'
name: 'SlopeProcessor'
config:
  channel_name: 'dem'
  unit: 'degrees'
  new_channel_name: 'slope'
  max_num_threads: null
ATTRIBUTE DESCRIPTION
channel_name

Channel name - defaults to 'dem'

TYPE: ChannelName | str

unit

Unit of the slope (DEGREES or PERCENT) - defaults to DEGREES

TYPE: SlopeUnit

new_channel_name

New channel name - defaults to 'slope'

TYPE: ChannelName | str

max_num_threads

Maximum number of threads - defaults to None

TYPE: int | None