1 of 8

Adding a new OGC API to pygeoapi

Tom Kralidis

Founder and Project Steering Committee Chair

@tomkralidis@noc.social

2024-07-10

2 of 8

At a glance

  • Created on Valentine’s Day 2018 with ❤️
  • OGC API standards Compliant
  • OGC Reference Implementation
  • OSGeo Project
  • Minimal core dependencies
  • Numerous deployment options / distribution
  • Plugins
    • Building blocks

3 of 8

Standards support matrix

OGC Standard

pygeoapi support

OGC API - Features

Reference Implementation

OGC API - Coverages

Implementing

OGC API - Records

Implementing

OGC API - Maps

Implementing

OGC API - Tiles

Reference Implementation

OGC API - Environmental Data Retrieval

Reference Implementation

OGC API - Processes

Implementing

SpatioTemporal Asset Catalog

Implementing

4 of 8

Standards support matrix

OGC Standard

pygeoapi support

OGC API - Routes

TBD (Ignacio Correas - Spain)

OGC API - Discrete Global Grid Systems

TBD (Alexander Kmoch - Estonia)

OGC API - Moving Features

TBD (Taehoon Kim - Japan)

5 of 8

Architecture

6 of 8

Architecture

7 of 8

Adding a new API to pygeoapi

  1. Add code to pygeoapi/api/<your_api>.py
    1. API functions
      1. Process headers/query parameters
      2. <your functionality>
      3. Output headers, HTTP status code, content
    2. OpenAPI stubs
  2. Hook new API functions to pygeoapi/api/__init__.py
  3. Glue routes to new API functions
    • pygeoapi/flask_app.py

8 of 8

Adding a new API to pygeoapi

Additional considerations:

  • HTML / UI output (in pygeoapi/templates)
  • Using configuration (in api.config object)

Example:

https://github.com/tomkralidis/pygeoapi/tree/add-new-api