Skip to content

GPKGFetcher

Bases: IDMixin

Tile fetcher for geopackages

Experimental

GPKGFetcher is experimental since 1.4.0 and may change without notice.

Implements the TileFetcher protocol.

PARAMETER DESCRIPTION
path

Path to the geopackage (.gpkg file)

TYPE: Path

epsg_code

EPSG code

TYPE: EPSGCode

channel_name

Channel name (if None, the channel is ignored)

TYPE: ChannelName | str | None

tile_size

Tile size in meters

TYPE: TileSize

buffer_size

Buffer size in meters

TYPE: BufferSize DEFAULT: 0

id property

RETURNS DESCRIPTION
uuid.UUID

ID

from_config classmethod

Creates a GPKG fetcher from the configuration.

PARAMETER DESCRIPTION
config

Configuration

TYPE: GPKGFetcherConfig

RETURNS DESCRIPTION
GPKGFetcher

GPKG fetcher

__call__

Fetches a tile from the geopackage.

PARAMETER DESCRIPTION
coordinates

Coordinates (x_min, y_min) of the tile in meters

TYPE: Coordinates

RETURNS DESCRIPTION
Tile

Tile


GPKGFetcherConfig

Bases: pydantic.BaseModel

Configuration for the from_config class method of GPKGFetcher

Create the configuration from a config file
  • Use null instead of None
Usage

You can create the configuration from a config file.

config.yaml
package: 'aviary'
name: 'GPKGFetcher'
config:
  path: 'path/to/my_gpkg.gpkg'
  epsg_code: 25832
  channel_name: 'my_channel'
  tile_size: 128
  buffer_size: 0
ATTRIBUTE DESCRIPTION
path

Path to the geopackage (.gpkg file)

TYPE: Path

epsg_code

EPSG code

TYPE: EPSGCode

channel_name

Channel name (if None, the channel is ignored)

TYPE: str

tile_size

Tile size in meters

TYPE: TileSize

buffer_size

Buffer size in meters - defaults to 0

TYPE: BufferSize