stac-extensions / eo

Covers electro-optical data that represents a snapshot of the Earth. It could consist of cloud cover and multiple spectral bands, for example visible bands, infrared bands, red edge bands and panchromatic bands.
Apache License 2.0
7 stars 10 forks source link

Need a collection example #6

Closed schwehr closed 1 year ago

schwehr commented 3 years ago

There is https://github.com/stac-extensions/eo/blob/main/examples/item.json. There needs to be a corresponding examples/collection.json.

schwehr commented 3 years ago

This might be a starter example https://gist.github.com/schwehr/8ae153363c744d14d49a7021f5c4cb0b. Thanks to @joshfix for the original that this example comes from

schwehr commented 3 years ago

https://gitter.im/SpatioTemporal-Asset-Catalog/1.0-testing?at=60b73a259d18fe19983cba77

Matthias Mohr

eo is only applicable to summaries, assets and item_assets in Collections. properties in collections is not a thing and will not be picked up by tooling. You should put the cloud cover into summaries.

It passes validation as there's a limitation in JSON Schema and we can't check assets and item_assets properly.

properties (aka the commons extension) has been removed in 1.0.0-beta.1

@m-mohr Can you point me at a valid example of using EO in a Collection?

    {
      "$comment": "This is the schema for STAC Collections.",
      "allOf": [
        {
          "type": "object",
          "required": [
            "type"
          ],
          "properties": {
            "type": {
              "const": "Collection"
            },
            "assets": {
              "type": "object",
              "additionalProperties": {
                "$ref": "#/definitions/fields"
              }
            },
            "item_assets": {
              "type": "object",
              "additionalProperties": {
                "$ref": "#/definitions/fields"
              }
            }
          }
        },
        {
          "$ref": "#/definitions/stac_extensions"
        }
      ]
    }
m-mohr commented 3 years ago

Sure, our openEO proxy is actually "fixing" the GEE files in such a way: https://earthengine.openeo.org/v1.0/collections/COPERNICUS/S2

schwehr commented 3 years ago

@m-mohr , I see that the S2 example has the collection-assets extension:

{
  "stac_version": "1.0.0-rc.2",
  "type": "Collection",
  "stac_extensions": [
    "collection-assets"
  ],
  "id": "COPERNICUS/S2",
  "title": "Sentinel-2 MSI: MultiSpectral Instrument, Level-1C",
  "gee:type": "image_collection",

But the stac-spec changelog for 1.0.0-rc.2 refers to the "former" collection-assets extension:

### Fixed

- Examples
- Collection Assets were specified as required (only in written text, not in JSON Schema), but that was incorrectly copied over from the former `collection-assets` extension. Collection Assets are not required.
m-mohr commented 3 years ago

That's indeed an oversight on my side. I have to remove it.

schwehr commented 3 years ago

Was there a commit that fixed this? @m-mohr

m-mohr commented 3 years ago

Oh yeah, I forgot to read the initial request. Thought it's just an openEO issue ;-)