Skip to content

GPKGLoader

Vector loader for geopackages

Implements the VectorLoader protocol.

PARAMETER DESCRIPTION
path

Path to the geopackage (.gpkg file)

TYPE: Path

epsg_code

EPSG code

TYPE: EPSGCode

layer_name

Layer name

TYPE: str

from_config classmethod

Creates a GPKG loader from the configuration.

PARAMETER DESCRIPTION
config

Configuration

TYPE: GPKGLoaderConfig

RETURNS DESCRIPTION
GPKGLoader

GPKG loader

__call__

Loads a vector from the geopackage.

RETURNS DESCRIPTION
Vector

Vector


GPKGLoaderConfig

Bases: pydantic.BaseModel

Configuration for the from_config class method of GPKGLoader

Example

You can create the configuration from a config file.

config.yaml
package: 'aviary'
name: 'GPKGLoader'
config:
  path: 'path/to/my_gpkg.gpkg'
  epsg_code: 25832
  layer_name: 'my_layer'
ATTRIBUTE DESCRIPTION
path

Path to the geopackage (.gpkg file)

TYPE: Path

epsg_code

EPSG code

TYPE: EPSGCode

layer_name

Layer name

TYPE: str