Skip to content

VectorExporter

Vector processor that exports a layer

The vector data is exported to a geopackage.

Implements the VectorProcessor protocol.

PARAMETER DESCRIPTION
layer_name

Layer name

TYPE: str

epsg_code

EPSG code

TYPE: EPSGCode

path

Path to the geopackage (.gpkg file)

TYPE: Path

remove_layer

If True, the layer is removed

TYPE: bool DEFAULT: True

from_config classmethod

Creates a vector exporter from the configuration.

PARAMETER DESCRIPTION
config

Configuration

TYPE: VectorExporterConfig

RETURNS DESCRIPTION
VectorExporter

Vector exporter

__call__

Exports the layer.

PARAMETER DESCRIPTION
vector

Vector

TYPE: Vector

RETURNS DESCRIPTION
Vector

Vector


VectorExporterConfig

Bases: pydantic.BaseModel

Configuration for the from_config class method of VectorExporter

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

You can create the configuration from a config file.

config.yaml
package: 'aviary'
name: 'VectorExporter'
config:
  layer_name: 'my_layer'
  epsg_code: 25832
  path: 'path/to/my_layer.gpkg'
  remove_layer: true
ATTRIBUTE DESCRIPTION
layer_name

Layer name

TYPE: str

epsg_code

EPSG code

TYPE: EPSGCode

path

Path to the geopackage (.gpkg file)

TYPE: Path

remove_layer

If True, the layer is removed - defaults to True

TYPE: bool