opengeospatial / ogcapi-records

An open standard for the discovery of geospatial resources on the Web.
https://ogcapi.ogc.org/records
Other
56 stars 26 forks source link

Distinguishing links to STAC / OGC API - Records? #276

Closed m-mohr closed 9 months ago

m-mohr commented 1 year ago

Do we need a way to distinguish links to STAC and OGC API - Records somehow?

A link to a STAC JSON file with relation type child looks exactly like a link to OGC API - Records, although they are not fully compatible. They both would look as follows:

{
  "href": "./catalog.json",
  "rel": "child",
  "type": "application/json"
}

I could see a world where STAC and Record JSON files will be mixed in one catalog (actually, I'm currently working on a project that would benefit from it).

The only way I could distinguish them right now consistently, is probably to load the files and check whether stac_version is present (STAC) or not (=> likely Records, but could also be something else).

Thoughts?

pvretano commented 1 year ago

@m-mohr that did not occur to me but now that you mention it, it might be a good idea. I was thinking of defining specific MIME types for each of the OARec file types ...

I think that would help the link issue ... no?

m-mohr commented 1 year ago

Yes, that would be a good solution, indeed.

pvretano commented 1 year ago

@m-mohr OK ... I'll create a PR to add these MIME types

m-mohr commented 1 year ago

@pvretano There's a relevant line of comments in the corresponding STAC issue, which you might want to consider: https://github.com/radiantearth/stac-spec/issues/1235#issuecomment-1580892218

Maybe something like application/geo+json; application=ogc-record is better to keep compliance with existing media types? I'm pretty sure it can't be registered though... (practice vs. bureaucracy, as for COG)

pvretano commented 1 year ago

@m-mohr yeah, I realized that about the record media type last night when I was thinking about this some more. application/geo+json; application=ogc-record sound find to me.