Skip to content

GridExporter

Tiles processor that exports the grid of the tiles

The grid is exported to a JSON file. The JSON string contains a list of coordinates (x_min, y_min) of each tile and the tile size.

Implements the TilesProcessor protocol.

PARAMETER DESCRIPTION
dir_path

Path to the directory

TYPE: Path

json_name

Name of the JSON file (.json file)

TYPE: str

from_config classmethod

Creates a grid exporter from the configuration.

PARAMETER DESCRIPTION
config

Configuration

TYPE: GridExporterConfig

RETURNS DESCRIPTION
GridExporter

Grid exporter

__call__

Exports the grid of the tiles.

PARAMETER DESCRIPTION
tiles

Tiles

TYPE: Tiles

RETURNS DESCRIPTION
Tiles

Tiles


GridExporterConfig

Bases: pydantic.BaseModel

Configuration for the from_config class method of GridExporter

Example

You can create the configuration from a config file.

config.yaml
package: 'aviary'
name: 'GridExporter'
config:
  dir_path: 'path/to/my/directory'
  json_name: 'processed_grid.json'
ATTRIBUTE DESCRIPTION
dir_path

Path to the directory

TYPE: Path

json_name

Name of the JSON file (.json file)

TYPE: str