An OGC API to geospatial data

pygeoapi.io

OSGeo Project FOSS4G 2024 Belém

This presentation available at pygeoapi.io/presentations/foss4g2024

Table of contents

  • Project overview
  • Core capabilities
  • Latest developments
  • Selected featured projects
  • Roadmap
  • Support

Project overview

Project overview

Project Overview

  • Geospatial data Web API framework via OGC API
  • REST/JSON/OpenAPI/Swagger
  • OGC Compliant
  • OSGeo Project
  • International team (Canada, Netherlands, Greece, Italy, New Zealand, United States, Portugal)
    • Numerous core contributors
    • 21000 upstream contributors (dependencies)

Install in 5 minutes


python3 -m venv pygeoapi
cd pygeoapi
. bin/activate
git clone https://github.com/geopython/pygeoapi.git
cd pygeoapi
pip3 install -r requirements.txt
python3 setup.py install
cp pygeoapi-config.yml example-config.yml
vi example-config.yml  # edit as required
export PYGEOAPI_CONFIG=example-config.yml
export PYGEOAPI_OPENAPI=example-openapi.yml
pygeoapi openapi generate $PYGEOAPI_CONFIG --output-file $PYGEOAPI_OPENAPI
pygeoapi serve
# in another terminal
curl http://localhost:5000  # or open in a web browser
						

Technical Overview

  • Core abstract API; web framework agnostic (default Flask)
  • YAML configuration (metadata, dataset connections)
  • Automated OpenAPI document generation and data binding
  • Robust plugin framework (data connections, formats, processing)
  • Easy deployment (pip install, Docker, conda, UbuntuGIS)
  • Minimal core dependencies

Provider plugin framework

  • Features (Elasticsearch, PostgreSQL/PostGIS, CSV, GeoJSON, GeoParquet, OGR, MongoDB, Esri, Azure)
  • Coverages (xarray, rasterio)
  • Tiles (MinIO, ZXY directory tree)
  • Records (Elasticsearch, TinyDB)
  • WxS facades / bridges (WMS/WMTS, WFS, CSW)
  • Implement your own!

Processing framework

  • Expose your Python workflow as processes
  • Process manager support for job control
  • Implement your own!

Implementing your own Plugin

  • Develop / propose / maintain as core plugin
  • Develop / maintain in your own repository

Implementing your own API

  • Add an OGC API, contribute to the core
  • Add an ad hoc API

Community Plugins and Themes

github.com/geopython/pygeoapi/wiki/CommunityPluginsThemes -- add yours!

schema.org

  • Lower the barrier to data search
  • HTML encoding is annotated as schema.org/Dataset to facilitate search engines
  • Google dataset search locates pygeoapi datasets

Linked Data - JSON-LD

  • JSON-LD provided as additional representation
  • Default out of the box functionality for most pygeoapi resources / endpoints
  • Additional configuration

Deploying

Numerous deployment options

  • PyPI
  • UbuntuGIS
  • Docker
    • See numerous ready to use examples (Kubernetes, AWS Lambda, etc.) at pygeoapi-examples
  • Conda
  • FreeBSD

Core Capabilities

OpenAPI

OGC API - Features

OGC API - Coverages

OGC API - Records

OGC API - Maps

OGC API - Tiles

OGC API - Processes

OGC API - Environmental Data Retrieval

SpatioTemporal Asset Catalog (STAC)

HTML templating

Admin API

Latest developments

New core committers

Welcome Bernhard Mallinger (@totycro)

  • Austria
  • EOX IT Services GmbH
  • pygeoapi: OGC API Processes, Coverages

Releases

  • March 2024: 0.16
  • July 2024: 0.17
  • September 2024: 0.18
  • December 2024: 0.19

EDR updates

  • Numerous HTML/UI updates

GeoParquet support

OGC API sprint participation

  • Rapid/early adoption of specifications/updates
  • Experimentation (servers, clients)
  • Open Standards Code Sprint (October 2023)
  • OGC/OSGeo/ASF Joint Sprint (February 2024)
  • Collaboration
    • OSGeo projects
    • OGC API implementing clients/servers

Admin API

  • API-based configuration workflow (server, resources)
  • OGC API - Features - Part 4
  • Create, Replace, Update, Delete
  • TODO: HTML UI/Web application

OGC Compliance

  • OGC API - Tiles
  • OGC API - Processes

New plugins

  • TinyDB (feature)
  • CSWFacade (record)
  • WMTSFacade (map)
  • Shapely functions (process)

Dependency policy

  • RFC2
  • baseline for stability, security

API code refactor

Security

  • CI / Docker CVE scanning
  • Trivy

First ever pygeoapi code sprint

  • Évora, Portugal
  • 29 February - 01 March 2024
  • Wiki page / report
  • Re-establishment of monthly meetings (open to all)
  • RFC4: automated warn/closure of PRs and issues after 90 days (stale bot) (thank you Ricardo Silva!)

Next code sprint: 2025 (Stay tuned!)

Selected recent projects

github.com/geopython/pygeoapi/wiki/LiveDeployments

Infraestructura de Datos Espaciales de España

Instituto Geográfico Nacional de España

  • OGC API - Features, Processes, Maps, Coverages

Italy

Municipality of Rome Capital

  • National Interoperability Platform PDND
  • OGC API - Features

geoportale-preprod.comune.roma.it/pdnd

Australia

Geoscience Australia Linked Data Register

  • OGC API - Features

linkeddata.pid.geoscience.gov.au

UN/WMO: wis2box

demo.wis2box.wis.wmo.int

Roadmap

OGC API - Pub/Sub

  • Developing specification on event driven workflow
  • Implementation at OGC/OSGeo/ASF Joint Sprint (April 2023)

Roadmap

  • 1.0
    • OGC API - Styles
  • Ensure compliance against all OGC API standards that have CITE tests
  • OGC CITE GitHub Actions (@ricardogsilva)
  • TileDB feature provider
  • Data / provider specific HTML templating

Service providers

  • training
  • setup/installation/deployment
  • custom integration
  • bug fixing
  • features/enhancements
  • core development
  • maintenance/packaging/distribution
  • documentation

Support

pygeoapi.io/community/service-providers

Swag!

Links

Thank you!

@tomkralidis @xbartolone @kalxas @pvgenuchten @justb4 @jorgejesus