Skip to content

GeoJSONLoader

Vector loader for GeoJSON files

Implements the VectorLoader protocol.

PARAMETER DESCRIPTION
path

Path to the GeoJSON file (.geojson file)

TYPE: Path

epsg_code

EPSG code

TYPE: EPSGCode

layer_name

Layer name

TYPE: str

from_config classmethod

Creates a GeoJSON loader from the configuration.

PARAMETER DESCRIPTION
config

Configuration

TYPE: GeoJSONLoaderConfig

RETURNS DESCRIPTION
GeoJSONLoader

GeoJSON loader

__call__

Loads a vector from the GeoJSON file.

RETURNS DESCRIPTION
Vector

Vector


GeoJSONLoaderConfig

Bases: pydantic.BaseModel

Configuration for the from_config class method of GeoJSONLoader

Example

You can create the configuration from a config file.

config.yaml
package: 'aviary'
name: 'GeoJSONLoader'
config:
  path: 'path/to/my_geojson.geojson'
  epsg_code: 25832
  layer_name: 'my_layer'
ATTRIBUTE DESCRIPTION
path

Path to the GeoJSON file (.geojson file)

TYPE: Path

epsg_code

EPSG code

TYPE: EPSGCode

layer_name

Layer name

TYPE: str