Skip to content

RasterizeProcessor

Bases: IDMixin

Tiles processor that rasterizes a channel

Experimental

RasterizeProcessor is experimental since 1.4.0 and may change without notice.

Notes
  • Requires a vector channel

Implements the TilesProcessor protocol.

PARAMETER DESCRIPTION
channel_name

Channel name

TYPE: ChannelName | str

field

Field

TYPE: str

ground_sampling_distance

Ground sampling distance in meters per pixel

TYPE: GroundSamplingDistance

mapping

Mapping of the values

TYPE: dict[object, int] | None DEFAULT: None

background_value

Background value

TYPE: int DEFAULT: 0

new_channel_name

New channel name

TYPE: ChannelName | str | None DEFAULT: None

max_num_threads

Maximum number of threads

TYPE: int | None DEFAULT: None

id property

RETURNS DESCRIPTION
uuid.UUID

ID

from_config classmethod

Creates a rasterize processor from the configuration.

PARAMETER DESCRIPTION
config

Configuration

TYPE: RasterizeProcessorConfig

RETURNS DESCRIPTION
RasterizeProcessor

Rasterize processor

__call__

Rasterizes the channel.

PARAMETER DESCRIPTION
tiles

Tiles

TYPE: Tiles

RETURNS DESCRIPTION
Tiles

Tiles


RasterizeProcessorConfig

Bases: pydantic.BaseModel

Configuration for the from_config class method of RasterizeProcessor

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: 'RasterizeProcessor'
config:
  channel_name: 'my_channel'
  field: 'my_field'
  ground_sampling_distance: .2
  mapping:
    'value': 1
  background_value: 0
  new_channel_name: null
  max_num_threads: null
ATTRIBUTE DESCRIPTION
channel_name

Channel name

TYPE: ChannelName | str

field

Field

TYPE: str

ground_sampling_distance

Ground sampling distance in meters per pixel

TYPE: GroundSamplingDistance

mapping

Mapping of the values - defaults to None

TYPE: dict[object, int] | None

background_value

Background value - defaults to 0

TYPE: int

new_channel_name

New channel name - defaults to None

TYPE: ChannelName | str | None

max_num_threads

Maximum number of threads - defaults to None

TYPE: int | None