Skip to content

RasterExporter

Bases: IDMixin

Tiles processor that exports raster channels

The raster data is exported to a geotiff for each tile.

Experimental

RasterExporter is experimental since 1.3.0 and may change without notice.

Notes
  • Requires raster channels

Implements the TilesProcessor protocol.

PARAMETER DESCRIPTION
channel_names

Channel name or channel names

TYPE: ChannelName | str | list[ChannelName | str]

epsg_code

EPSG code

TYPE: EPSGCode

path

Path to the directory

TYPE: Path

remove_channels

If True, the channels are removed

TYPE: bool DEFAULT: True

max_num_threads

Maximum number of threads

TYPE: int | None DEFAULT: None

id property

RETURNS DESCRIPTION
uuid.UUID

ID

from_config classmethod

Creates a raster exporter from the configuration.

PARAMETER DESCRIPTION
config

Configuration

TYPE: RasterExporterConfig

RETURNS DESCRIPTION
RasterExporter

Raster exporter

__call__

Exports the raster channels.

PARAMETER DESCRIPTION
tiles

Tiles

TYPE: Tiles

RETURNS DESCRIPTION
Tiles

Tiles


RasterExporterConfig

Bases: pydantic.BaseModel

Configuration for the from_config class method of RasterExporter

Create the configuration from a config file
  • Use null instead of None
  • Use false or true instead of False or True
Usage

You can create the configuration from a config file.

config.yaml
package: 'aviary'
name: 'RasterExporter'
config:
  channel_names:
    - 'r'
    - 'g'
    - 'b'
  epsg_code: 25832
  path: 'path/to/my_directory'
  remove_channels: true
  max_num_threads: null
ATTRIBUTE DESCRIPTION
channel_names

Channel name or channel names

TYPE: ChannelName | str | list[ChannelName | str]

epsg_code

EPSG code

TYPE: EPSGCode

path

Path to the directory

TYPE: Path

remove_channels

If True, the channels are removed - defaults to True

TYPE: bool

max_num_threads

Maximum number of threads - defaults to None

TYPE: int | None