A library that converts ISO 19115-3 XML, UMM JSON & TrainingDML-AI JSON metadata to ISO 19115-4 JSON, available as a FastAPI API, a Python module and a CLI.
Developed for OGC Testbed 21 task DQ4IPT D103 - DQ4IPT Enabled Software Library.
Available at - ocl.dev.kurrawong.ai
There are two endpoints available (see the OpenAPI docs):
/validate- Validates a metadata file of a specified format (being one ofiso3,umm,trainingDMLoriso4) at a URL- GET - the
?fileURL must be URL-encoded - POST -
file&formatPOSTed in a JSON body
- GET - the
/convert- Converts a metadata file from a specified format (being one ofiso3,umm, ortrainingDML) at a URL to ISO 19115-4 JSON- GET - the
?fileURL must be URL-encoded - POST -
file&formatPOSTed in a JSON body
- GET - the
See the API README for more details.
The conversion library (currently called ocl, name TBD) can be used as a module in Python and as a CLI.
Example:
from ocl.convert import convert
output = convert("data/test/test.json", "umm")The commands available to run via the CLI are:
ocl validate <file> -f iso3|umm|trainingDML|iso4ocl convert <file> -f iso3|umm|trainingDMLSee the library README for more details.
Install the project (requires uv) by running:
uv syncA number of commands are available in the Taskfile, e.g.:
task run:lib