Open-EO / openeo-python-driver

Common parts of a Python driver implementation for OpenEO
Apache License 2.0
11 stars 5 forks source link

top-level "epsg" property in STAC Item #260

Open bossie opened 9 months ago

bossie commented 9 months ago

A batch job results item has a top-level "epsg" property:

{
  "assets": {
    "openEO.tif": {
      "eo:bands": [
        {
          "center_wavelength": 0.6646,
          "name": "B04"
        },
        {
          "center_wavelength": 0.8328,
          "name": "B08"
        }
      ],
      "file:nodata": [
        "nan"
      ],
      "file:size": 696369,
      "href": "https://openeo-dev.vito.be/openeo/1.1/jobs/j-24020792a110457fa713a8a3a702e70c/results/assets/.../openEO.tif?expires=1708080177",
      "proj:bbox": [
        553630,
        5618240,
        702380,
        5648760
      ],
      "proj:epsg": 32631,
      "proj:shape": [
        14875,
        3052
      ],
      "raster:bands": [
        {
          "name": "B04",
          "statistics": {
            "maximum": 5324,
            "mean": 512.68561347599,
            "minimum": 1,
            "stddev": 331.19358871402,
            "valid_percent": 0.04838
          }
        },
        {
          "name": "B08",
          "statistics": {
            "maximum": 6397,
            "mean": 3032.8594091406,
            "minimum": 335,
            "stddev": 1164.6197215889,
            "valid_percent": 0.04839
          }
        }
      ],
      "roles": [
        "data"
      ],
      "title": "openEO.tif",
      "type": "image/tiff; application=geotiff"
    }
  },
  "bbox": null,
  "collection": "j-24020792a110457fa713a8a3a702e70c",
  "epsg": 32631,
  "geometry": null,
  "id": "openEO.tif",
  "links": [
    {
      "href": "https://openeo-dev.vito.be/openeo/1.1/jobs/j-24020792a110457fa713a8a3a702e70c/results/items/openEO.tif",
      "rel": "self",
      "type": "application/geo+json"
    },
    {
      "href": "https://openeo-dev.vito.be/openeo/1.1/jobs/j-24020792a110457fa713a8a3a702e70c/results",
      "rel": "collection",
      "type": "application/json"
    }
  ],
  "properties": {
    "datetime": null,
    "end_datetime": "2022-02-01T00:00:00Z",
    "proj:bbox": [
      553630,
      5618240,
      702380,
      5648760
    ],
    "proj:shape": [
      14875,
      3052
    ],
    "start_datetime": "2022-01-01T00:00:00Z"
  },
  "stac_extensions": [
    "https://stac-extensions.github.io/eo/v1.1.0/schema.json",
    "https://stac-extensions.github.io/file/v2.1.0/schema.json"
  ],
  "stac_version": "0.9.0",
  "type": "Feature"
}

I would expect "properties"/"proj:epsg" instead but I'm not sure if this is maybe according to an older version of STAC.

@JohanKJSchreurs?

JohanKJSchreurs commented 9 months ago

In the current version of the Projection STAC extension, it should indeed be "properties"/"proj:epsg"

Re: older standards: my first impression is that epsg at the top level was never really part of the STAC spec or the Projection extension.

I had a look at the STAC spec v0.0.9, v0.0.8 and the previous version of the Projection extension (v1.0.0) but as far as I can tell they also expect "properties"/"proj:epsg" (going by the examples they provide).

To fully confirm it I would have to dig deeper. But another indication is that a few bits of the stacspec changelog indicate that in older versions they were using eo:epsg rather than epsg at the top level. Some changelog messages say they moved from using eo:epsg in an older standard, to proj:epsg.

m-mohr commented 3 months ago

There was never an espg property as far as I can recall. It's been proj:epsg for years now.