Open-EO / openeo-api

The openEO API specification
http://api.openeo.org
Apache License 2.0
91 stars 11 forks source link

openEO oriented JSON types #539

Open soxofaan opened 3 months ago

soxofaan commented 3 months ago

In the JSON world it's common to use a "type" field to indicate what the nature of an object is: e.g. GeoJSON (types "Polygon", "Point", "Feature", ...) or STAC ("Catalog", "Collection).

We're starting to integrate openEO resources outside typical openEO contexts (e.g. remote UDPs #515) and I think it makes sense to start introducing openEO-oriented types for that.

For example, an external UDP should be something like

{
  "type": "openeo-process",
  "id": "evi",
  "process_graph": ...

I arbitrarily picked "openeo-process" here. I'm unaware of any common conventions about that at the moment, so it could equally be "openEO-process", "openEO/process" or whatever

Enforcing this in openEO API 1.x itself is out of the question of course as this would be a breaking change. But it would be good to already settle on some types so that tools can build on that in a future compatible way.

m-mohr commented 3 months ago

Do you know any examples outside of GeoJSON-inspired formats? The STAC types are inspired by GeoJSON. I'm wondering whether type is somewhat commonly used outside our bubble...

soxofaan commented 3 months ago

Indeed, I might be extrapolating from our bubble too much here. But still, openEO has quite some touching points with GeoJSON and STAC, so it still makes sense to adapt some patterns.

Some other comparable solutions I can think of:

but both of these use URIs, which makes it less human friendly than a simple short string