pygeoapi-logo

How to use PyGeoAPI

Install

pip install OWSLib

Connect and query features

from owslib.ogcapi.features import Features

eodc_OGCAPI = "https://features.services.eodc.eu/"

eodc_ogcapi = Features(eodc_OGCAPI)

# List available collections
feature_collections = eodc_ogcapi.feature_collections()

# Query items from a specific collection
items = eodc_ogcapi.collection_items("world_administrative_boundaries")

Step by step:

  1. Features(eodc_OGCAPI) — connects to the eodc OGC API Features endpoint. No authentication required for public collections.

  2. feature_collections() — returns all available collections as a dictionary. Use this to discover what datasets are accessible.

  3. collection_items("collection_name") — retrieves features from a specific collection. Results are returned as GeoJSON.

Filtering results

You can filter items spatially and temporally by passing parameters:

items = eodc_ogcapi.collection_items(
    "world_administrative_boundaries",
    bbox=[9.5, 46.3, 17.2, 49.0],  # Austria bounding box
    limit=100
)

Tips

  • Private collections require a Bearer token. Pass it via the OWSLib auth header: Features(eodc_OGCAPI, auth=...).

  • Browse available collections directly in the browser at https://features.services.eodc.eu/collections.

  • For a dataset-specific example, see the YIPEEO Data Access notebook.