Skip to content

BoundingBoxLoader

Vector loader for bounding boxes

Implements the VectorLoader protocol.

PARAMETER DESCRIPTION
bounding_box

Bounding box

TYPE: BoundingBox

epsg_code

EPSG code

TYPE: EPSGCode

layer_name

Layer name

TYPE: str

from_config classmethod

Creates a bounding box loader from the configuration.

PARAMETER DESCRIPTION
config

Configuration

TYPE: BoundingBoxLoaderConfig

RETURNS DESCRIPTION
BoundingBoxLoader

Bounding box loader

__call__

Loads a vector from the bounding box.

RETURNS DESCRIPTION
Vector

Vector


BoundingBoxLoaderConfig

Bases: pydantic.BaseModel

Configuration for the from_config class method of BoundingBoxLoader

Example

You can create the configuration from a config file.

config.yaml
package: 'aviary'
name: 'BoundingBoxLoader'
config:
  bounding_box_coordinates:
  - 363084
  - 5715326
  - 363340
  - 5715582
  epsg_code: 25832
  layer_name: 'my_layer'
ATTRIBUTE DESCRIPTION
bounding_box_coordinates

Bounding box coordinates (x_min, y_min, x_max, y_max) in meters

TYPE: tuple[Coordinate, Coordinate, Coordinate, Coordinate]

epsg_code

EPSG code

TYPE: EPSGCode

layer_name

Layer name

TYPE: str