In this section: Build
Start
Reference code
- obsp (C)
- Conformance runner (reference service)
- obsp (Go)
- Plugfests (non-normative groundwork)
- Python reference pipelines (draft profiles, synthetic data)
- obsp-eo
- obsp-model-run (draft OIP-0012, MODEL-OBSERVER)
- obsp-sensing (draft OIP-0011, NETWORK-SENSING, provisional)
- obsp-space
- Rust reference workspace
- Performance bench (WP-RI-11)
- The 0.2 candidate (DRAFT)
- obsp-core (Rust reference library)
- obsp-federation
- obsp-node-embedded
- Node agent (obsp-node)
- Evidence verifier (obsp-verify)
- obsp-sdk (TypeScript / ES modules)
Tools
API reference
- All APIs
- Observatory Protocol service administration (production services)
- Observatory Protocol CloudEvents (draft OIP-0024 binding)
- Observatory Protocol correction subscriptions
- Observatory Protocol credential status (reference service)
- Observatory Protocol discovery (reference service)
- Observatory Protocol exchange API (reference)
- Observatory Protocol federation sync (draft OIP-0004)
- Observatory Protocol Field Topic Contract (MQTT 5 and Sparkplug B)
- Observatory Protocol participant gateway
- gRPC services
- Observatory Protocol implementations and conformance registry (reference service)
- Observatory Protocol transparency log (reference service)
- Observatory Protocol WIS 2.0 notifications (draft OIP-0009 binding)
Public services
Bindings and crosswalks
obsp-eo
| Field | Value |
|---|---|
| Status | Reference code written against draft proposals (DRAFT); accepts no proposal; no conformance claim |
| Package | obsp-eo |
| Version | 0.1.0 |
| Source | Python reference tools |
An Earth-observation product toolchain for three draft proposals of the Observatory Protocol: OIP-0020 (coverage
observations, chunk digests, ARD claims, detections with response history), OIP-0009 (the STAC obsp extension) and
OIP-0026 (the C2PA assertion, the PROV-O export). All three are DRAFT; this is reference code written against their
patches, not against accepted text, and it makes no conformance claim. No implementation is listed by it and no
conformance level is declared for it. Every ARD claim it writes is a self-assessment (or names an assessor’s credential
that the caller supplies); it writes no field or value that states an approval by an outside body.
Python 3.10 or later, standard library only (numpy is not needed). Readers for GeoTIFF/COG and Zarr v3 are small and written for the test data: no GDAL, no pixel decoding, no network access.
Commands
python3 -m obsp_eo COMMAND ... (or obsp-eo once installed). Each command prints a JSON report and exits 0 (done),
1 (a check found a problem) or 2 (the input could not be used). --schema-dir DIR on the writing commands also validates
the output against the draft schemas in DIR (needs jsonschema; see Tests for how to get such a tree).
| Command | What it does |
|---|---|
manifest |
Walks a COG file or a Zarr v3 directory, digests every chunk, signs the chunk manifest and writes a coverage observation (coverage-observation.json) and the signed manifest (chunk-manifest.json). |
verify |
Recomputes every digest from the store and compares: reports tampered, missing and unlisted chunks, a manifest whose digest is not that of its list, a signature that does not match, and a grid or band that differs from the file. |
stac |
Writes a STAC 1.1 Item (a product version) and Collection (the product) with the obsp: extension fields. |
lineage |
Builds the product lineage graph, checks it (acyclic; inputs match their digests; origin aggregate not stronger than its weakest input; level not below an input’s), and with --run-time, --bundle-uni and --agent UNI=ROLE writes a provenance bundle and its PROV-O JSON-LD. |
ard-claim |
Writes a self-assessed claim document from a requirement checklist (below). |
detection |
create, notify, respond, show, check: detection records whose notification and response history is append-only. |
c2pa |
Writes the data of the org.obsp.evidence assertion for an image drawn from a product (signing and embedding stay with the operator’s C2PA tool). |
Worked example
examples/run.sh OUT_DIR [SCHEMA_DIR] runs the whole flow on synthetic data (a 512x512 tiled GeoTIFF with an overview,
written by tests/synth.py; nothing is downloaded). The steps, as commands (eo stands for python3 -m obsp_eo with
PYTHONPATH=src):
python3 tests/synth.py out/data # sar-nrb.tif (COG layout, 5 tiles) and sr-l2a.zarr
# 1. digest the tiles, sign the manifest, write the coverage observation
eo manifest --store out/data/sar-nrb.tif --meta examples/meta-sar-nrb.json \
--seed-file examples/test-seed.hex --out-dir out/coverage
# -> out/coverage/coverage-observation.json, out/coverage/chunk-manifest.json
# 2. recompute from the store: exit 0; flip one byte of a tile and recompute: exit 1 and the tile is named
eo verify --coverage out/coverage/coverage-observation.json --store out/data/sar-nrb.tif \
--manifest-file out/coverage/chunk-manifest.json --public-key <hex public key from chunk-manifest.json>
# {"ok": false, "problems": [{"kind": "chunk-tampered", "key": "ifd0/tile/0/0", ...}]} (on the altered copy)
# 3. products whose lineage pins the coverage by digest (examples/make-products.py), then a claim and the lineage
eo ard-claim --checklist examples/checklist-nrb.json --product out/products/nrb.json \
--claim-uni uni:ard-claim:sar03-nrb-20260812 --out out/claim.json
eo lineage --product out/products/nrb.json --product out/products/flood.json \
--coverage out/coverage/coverage-observation.json --out-dir out/lineage \
--bundle-uni uni:provenance:flood-20260813-bundle --run-time 2026-08-13T06:00:00Z \
--agent uni:participant:space-segment-operator-01=PROVIDER
# -> lineage-graph.json, provenance.json, provenance.jsonld
# 4. exchange
eo stac --product out/products/nrb.json --coverage out/coverage/coverage-observation.json \
--provenance out/lineage/provenance.json --ard-claim out/claim.json \
--base-url https://data.example.org/obsp/stac --out-dir out/stac
eo c2pa --product out/products/flood.json --provenance out/lineage/provenance.json \
--rendering-kind QUICKLOOK --out out/c2pa-assertion.json
# 5. a detection: every step writes the next revision (r0001.json, r0002.json, ...); none is rewritten
eo detection create --dir out/detections --spec examples/detection-spec.json
eo detection notify --dir out/detections --uni uni:detection:methane-plume-site-k12-20260816 --role FACILITY_OPERATOR
eo detection respond --dir out/detections --uni uni:detection:methane-plume-site-k12-20260816 \
--state ACKNOWLEDGED --by-role FACILITY_OPERATOR
eo detection check --dir out/detections --uni uni:detection:methane-plume-site-k12-20260816
The key in examples/test-seed.hex is a public test key and protects nothing.
The meta file of manifest
JSON with the fields a store cannot state: coverageUni, version, observer, procedure, processingLevel,
acquisitionTime, origin, operatorUni, storeUri, signing (keyRef, signerRole), bands[] (name,
observedProperty, unit, optional scale, offset, centralWavelength, polarisation, nodata), and optionally
resultTime, recordedAt, footprint, manifestUri, modelRunRef, calibrationRefs, provenanceRef, domain.
The tool reads size, transform, CRS (EPSG code), sample type and nodata from a GeoTIFF and fails when the meta file
disagrees. A Zarr v3 store states no georeferencing, so domain (crs, transform) is required for it; a band’s
nodata defaults to the array’s numeric fill_value. footprint is derived only for an EPSG:4326 grid. The band
property ids are those the drafts use as examples; they were not checked against the observed-property register.
The checklist of ard-claim
JSON: specification (family, identifier, version), assessment (recordRef, assessedAt, assessorRole,
assessorUni) and groups[] of {group, label?, evidenceRef?, requirements: [{id, text?, level}]} where a
requirement’s level is the highest level it is met at (TARGET, THRESHOLD, NOT_MET). A group’s level is the
lowest of its requirements; the claimed level is the lowest group. With any group not met no claim is written (exit 2,
the unmet requirements named). --assessor-credential-ref UNI,DIGEST makes the claim not self-assessed. The
requirement texts stay in the checklist; the claim carries group levels only.
Conventions this tool chose (not text of a draft)
- Chunk keys. COG:
ifd<N>/tile/<row>/<column>(orifd<N>/strip/<n>), one entry per tile of every image in the file, so a tile is checked on its own (OIP-0020 open question 5). Zarr: the key of the file relative to the store, such asB04/c/0/1. Chunk digests are SHA-256 of the stored bytes (compressed, as written). - Zarr metadata is listed too. Every
zarr.jsonis an entry ofchunks, so a changed fill value, codec or chunk shape is caught like a changed chunk. Keep the filesmanifestwrites outside the store, orverifyreports them as unlisted. - Signature. Ed25519, in pure Python (RFC 8032; checked against the RFC’s vectors). The signed message is the
canonical JSON of
{chunks: chunkManifest.digest, coverage: digest of the document without chunkManifest}, so the signature covers every field of the coverage document, not only the chunk list.signatureDigestis the digest of the signature bytes; the signature and the public key travel inchunk-manifest.json. A key in that file proves nothing about who holds it: pass--public-keyfrom a trusted source. OIP-0020 leaves the signature shape open (its question 6) and OIP-0008 may replace it. - Digests are RFC 8785 canonical JSON, SHA-256,
sha256:<hex>, the same form as the repository’s SDK (a test compares them). - STAC. An Item’s
datetimeis null withstart_datetime/end_datetimefrom the manifest’sextent; with no temporal extent it is the generation time in the provenance bundle (the binding’s rule) and a note says so. With no CRS84 box the Item has no geometry and the Collection the whole-world box.obsp:upstream_termandobsp:qualityhave no source here and are not written.obsp:ard_claimis written only for a self-assessed claim. The Collection’slicenseisotherunless--licensesays otherwise; no licence is invented. The STAC core schemas are not in this repository, so the tests check the core members this tool writes by hand and the extension by its schema. - Provenance from lineage. Each product and input is an entity, each distinct
activityRefan activity that used its inputs and generated the product at--run-time; agents are those given with--agent, by UNI and role only. An input withoutobjectKindgets the type segment of its UNI asentityKind(ordata-object).
Tests
make eo # from the repository root; 48 tests, a few seconds
The tests do not use the live schemas alone: tests/draftree.py copies the schemas, bindings and suite code to a
scratch directory and applies the patches of OIP-0020 (schemas, invariants), OIP-0009 (STAC binding) and OIP-0026 (C2PA
and PROV-O bindings) with git apply. The live tree is untouched. Needs git and jsonschema (in requirements.txt).
Set OBSP_EO_DRAFT_TREE to reuse a tree built earlier. Every output of the worked example is validated against those
draft schemas and run through the draft’s own invariants (coverage-domain-consistent, coverage-chunks-in-manifest,
product-lineage-acyclic, ard-claim-consistent, detection-magnitude-uncertainty, detection-response-append-only).
Limits
- No pixel decoding, no overview generation, no validation that a file is a COG beyond reading its directories.
- Classic TIFF and BigTIFF, uint8, uint16, int16, int32, float32 and float64 samples; the regular Zarr chunk grid and
the default chunk key encoding with
/. - Not built: DCAT export (OIP-0026), HXL tables, WIS 2.0, OGC API.
- All standards named here are cited by name; the mapping rows of the drafts are
checked: not checkedand so is the use made of them here.