Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add support for the STAC Storage and Alternate-Asset Extensions #370

Open
rowanwins opened this issue Apr 12, 2022 · 0 comments
Open

Add support for the STAC Storage and Alternate-Asset Extensions #370

rowanwins opened this issue Apr 12, 2022 · 0 comments

Comments

@rowanwins
Copy link
Member

At the moment STAC Items are published they contain asset href's pointing to S3 formatted urls

{
  "stac_version": "1.0.0",
  "type": "Feature",
  "id": "0056f1dc-bdfb-4cc0-909c-3ca9c9d219b2",
  "properties": {},
  "geometry": {},
  "links": [
    ...
  ],
  "assets": {
    "fmask": {
      "href": "s3://dea-public-data/baseline/s2a_ard_granule/2015-07-12/S2A_OPER_MSI_ARD_TL_EPA__20160811T012341_A000271_T52KFG_N02.04/QA/S2A_OPER_MSI_ARD_TL_EPA__20160811T012341_A000271_T52KFG_N02.04_FMASK.TIF",
      "type": "image/tiff; application=geotiff; profile=cloud-optimized",
       ...

Unfortunately these URLs aren't regular public http/https urls. And reverse engineering them into something useful requires knowledge of the storage region.

The Storage and Alternate-Assets Extensions have been proposed and adopted by ppl like USGS to try and mitigate this issue.

For example here's one of the USGS items

{
  "type": "Feature",
  "stac_version": "1.0.0",
  "stac_extensions": [
    "https://landsat.usgs.gov/stac/landsat-extension/v1.1.1/schema.json",
    "https://stac-extensions.github.io/view/v1.0.0/schema.json",
    "https://stac-extensions.github.io/projection/v1.0.0/schema.json",
    "https://stac-extensions.github.io/eo/v1.0.0/schema.json",
    "https://stac-extensions.github.io/alternate-assets/v1.1.0/schema.json",
    "https://stac-extensions.github.io/storage/v1.0.0/schema.json"
  ],
  "id": "LC09_L2SR_084082_20220409_20220411_02_T2_SR",
  "description": "Landsat Collection 2 Level-2 Surface Reflectance Product",
  "bbox": [],
  "geometry": {},
  "properties": {},
  "assets": {
    "thumbnail": {
      "title": "Thumbnail image",
      "type": "image/jpeg",
      "roles": [
        "thumbnail"
      ],
      "href": "https://landsatlook.usgs.gov/data/collection02/level-2/standard/oli-tirs/2022/084/082/LC09_L2SR_084082_20220409_20220411_02_T2/LC09_L2SR_084082_20220409_20220411_02_T2_thumb_small.jpeg",
      "alternate": {
        "s3": {
          "storage:platform": "AWS",
          "storage:requester_pays": true,
          "href": "s3://usgs-landsat/collection02/level-2/standard/oli-tirs/2022/084/082/LC09_L2SR_084082_20220409_20220411_02_T2/LC09_L2SR_084082_20220409_20220411_02_T2_thumb_small.jpeg"
        }
      }
    },

From a consumers point of view it makes it easier to work the Items because I have a valid URL that I don't have to guess reverse-engineer.

Hopefully you can see the value in adopting these extensions
Thanks,
Rowan

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

1 participant