This project provides a JSON converter to transform an OGC API - Processes
processDescription (Part 1: Core, ZOO-Project style) into openEO process metadata.
openEO target: 1.3.0 (process structure of GET /processes).
The project is now organized as a package under src/openeo_ogc_converter.
- Core API: conversion and HTTP helpers (
openeo_ogc_converter.core) - Bulk API: catalog loading and list conversion (
openeo_ogc_converter.bulk) - CLI entrypoints:
openeo_ogc_converter.cli_singleopeneo_ogc_converter.cli_bulk
Backward-compatible root scripts are kept:
ogc_process_to_openeo.pyogc_processes_list_to_openeo.py
Install Hatch once:
python3 -m pip install hatchBuild wheel + sdist:
hatch buildRun tests:
hatch run testInstall locally in editable mode:
python3 -m pip install -e .Then use installed commands:
ogc-process-to-openeo --help
ogc-processes-list-to-openeo --helpOr run modules directly:
python3 -m openeo_ogc_converter.cli_single --help
python3 -m openeo_ogc_converter.cli_bulk --helpMinimal API usage:
from openeo_ogc_converter.core import convert_document
openeo_process = convert_document(process_description_json)- OGC
id-> openEOid - OGC
title/description-> openEOsummary/description - OGC
inputs-> openEOparameters - OGC
outputs-> openEOreturns - OGC
keywords-> openEOcategories(normalized to snake_case) - OGC
links-> openEOlinks
Important rules:
- If an input has
maxOccurs > 1(orunbounded), the openEO schema becomes anarray. - If
minOccurs == 0, the openEO parameter is marked asoptional: true. - If multiple outputs exist, they are merged into a single
returns.schemaof typeobjectwith one property per output.
- JSON Schema base types are preserved as-is. openEO supports:
string,number,integer,boolean,array,object,null. A warning is logged if a schema declares a base type outside this set. - Common OGC
formathints are mapped to openEOsubtypevalues, for example:ogc-bbox->bounding-boxuri/url->uristac,stac-collection,stac-item->stacdate,date-time,time,duration-> matching subtypesepsg-code->epsg-code,wkt2->wkt2-definition
- The
ogc-bboxpattern expressed asallOf: [{ "format": "ogc-bbox" }, ...]is detected and annotated withsubtype: bounding-box. - When the standard
schemadoes not expose aformat, the converter falls back to the ZOO-Project extensionsoriginal-schemaandextended-schemato infer the subtype. These fields are optional and their absence never causes an error. - Ambiguous
oneOf/anyOfschemas are left untouched to avoid wrong subtypes.
Both CLIs use Python logging. Control verbosity with:
-v/--verbose: debug-level logging-q/--quiet: only warnings and errors
python3 ogc_process_to_openeo.py process_description.json -o process_openeo.jsonpython3 ogc_process_to_openeo.py process_description.json --as-processes-list -o processes.jsonpython3 ogc_process_to_openeo.py process_description.json --split-multi-outputs -o processes_split.jsonWhen enabled, each OGC output becomes a dedicated openEO process variant with an id
suffix based on the output name (for example buffer__result).
python3 ogc_process_to_openeo.py process_description.jsonpython3 ogc_processes_list_to_openeo.py https://example.org/ogc-api --limit 100 -o processes.jsonYou can also use a local JSON file as input when it contains a /processes
response object (with a processes array):
python3 ogc_processes_list_to_openeo.py local_processes.json -o processes.jsonTo accept a local file containing a single processDescription object:
python3 ogc_processes_list_to_openeo.py process_description.sample1.json --accept-single-process-description -o processes.jsonUseful options:
--max-processes N: stop after converting N process summaries (global cap across pages)--split-multi-outputs: generate one openEO process variant per output--version auto|null|VALUE: set outputversionfieldauto: reuse source/processesversion when presentnull: force JSON nullVALUE: set a fixed string (for example1.3.0)
Notes for local input:
- The bulk script does not fetch
/processes/{id}when using a local file. - A single
processDescriptionJSON file is accepted only with--accept-single-process-description.
{
"id": "buffer",
"title": "Buffer",
"description": "Create a geometry buffer.",
"keywords": ["vector", "geometry"],
"inputs": {
"geom": {
"description": "Input geometry",
"minOccurs": 1,
"maxOccurs": 1,
"schema": {
"type": "object"
}
},
"distance": {
"description": "Buffer distance",
"minOccurs": 0,
"maxOccurs": 1,
"schema": {
"type": "number",
"default": 10
}
}
},
"outputs": {
"result": {
"description": "Buffered geometry",
"schema": {
"type": "object"
}
}
}
}- JSON schema mapping is structural: it does not translate domain vocabularies.
- Non-standard OGC attributes are ignored unless already compatible with openEO.
- Listed processes without
inputs/outputs(summaries only) cannot be converted into complete openEO processes.