An OGC API to geospatial data

pygeoapi.io

OSGeo Project FOSS4G 2023 Florence

This presentation available at pygeoapi.io/presentations/foss4g2023

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, Spain)
    • 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, OGR, MongoDB, Esri, Azure)
  • Coverages (xarray, rasterio)
  • Tiles (MinIO, ZXY directory tree)
  • Records (Elasticsearch, TinyDB)
  • 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

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
  • 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

Latest developments

Releases

  • November 2022: 0.13
  • February 2023: 0.14
  • May 2023: 0.15

OGC API sprint participation

  • Rapid/early adoption of specifications/updates
  • Experimentation (servers, clients)
  • Metadata Code Sprint (September 2022)
  • Web Mapping Code Sprint (November 2022)
  • OGC/OSGeo/ASF Joint Sprint (March 2023)
  • Collaboration
    • OSGeo projects
    • OGC API implementing clients/servers

OGC API Transactions

  • OGC Metadata Code Sprint (September 2022)
  • OGC API - Features - Part 4
  • Create, Replace, Update, Delete

OGC API - Maps

  • OGC Web Mapping Code Sprint (November 2022)
  • MapServer MapScript, WMS Facade

CRS Support

Adherence to Dutch API rules (ADR)

  • API-03: Apply standard HTTP methods
  • API-16: Provide OpenAPI Specification
  • API-20: Include major version number in URI
  • API-48: Leave off trailing slashes from URIs
  • API-51: OAS at a standard location as JSON
  • API-56: Adhere to Semantic Versioning model
  • API-57: Full version number in response header

New plugins

  • Esri REST API
  • Azure (STAC)
  • ERDDAP
  • MongoDB process manager

More new features

  • Django support (done at FOSS4G 2022 Sprint!)
  • JSON minification option
  • JSON-LD templating for feature collection items
  • Numerous ongoing improvements (standards, plugins)
  • INSPIRE improvements (collections/links)

Selected recent projects

github.com/geopython/pygeoapi/wiki/LiveDeployments

Spain

  • National Cartographic System of Spain
  • National Geographic Institute of Spain
  • OGC API - Maps (¡Felicidades!) / OGC API - Features
  • More to come (OGC API - Coverages, OGC API - Proceses, etc.)

api-features.idee.es

api-features.ign.es

UN/WMO: wis2box

demo.wis2box.wis.wmo.int

UN/WMO: OpenCDMS

  • FOSS implementation of WMO Climate Data Management System Specifications
  • API component
  • Customizes and extends pygeoapi including adding vocabularies, authentication and new plugins

opencdms.org

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
    • API Refactor
    • Long term stability / dependencies
  • Oracle feature provider
  • 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 @JMendesDeJesus @justb4 @pvgenuchten @tzotsos @francbartoli