Skip to content

Conversation

danlooo
Copy link
Contributor

@danlooo danlooo commented Oct 8, 2025

This PR fixes outdated schema of STAC extension projection.

The formerly deprecated field proj:espg was removed in favor of proj:code.
A former "proj:epsg": 3857 is now "proj:code": "EPSG:3857".
see https://github.com/stac-extensions/projection/releases/tag/v2.0.0 as of Jul 22, 2024

Error

openEO code

{
  "categories": [],
  "deprecated": false,
  "experimental": false,
  "process_graph": {
    "1": {
      "process_id": "load_stac",
      "arguments": {
        "bands": [
          "B01_20m"
        ],
        "spatial_extent": null,
        "temporal_extent": [
          "2021-01-01T00:00:00Z",
          "2021-02-01T00:00:00Z"
        ],
        "properties": {},
        "url": "https://stac.dataspace.copernicus.eu/v1/collections/sentinel-2-l2a/items/S2B_MSIL2A_20251008T080729_N0511_R078_T43XDH_20251008T085522"
      }
    },
    "save2": {
      "process_id": "save_result",
      "arguments": {
        "data": {
          "from_node": "1"
        },
        "format": "GTIFF"
      },
      "result": true
    }
  }
}

results into ValueError: The asset must have the following fields (from the projection extension): shape, transform, and one of an epsg, wkt2, or projjson

Solution

Pystac needs to be >=v1.12 see https://github.com/stac-utils/pystac/releases/tag/v1.12.0

@danlooo danlooo changed the title Update stac projection extension code [Draft] Update stac projection extension code Oct 8, 2025
@danlooo danlooo changed the title [Draft] Update stac projection extension code Update stac projection extension Oct 8, 2025
Copy link

codecov bot commented Oct 8, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.64%. Comparing base (010c214) to head (d8671ca).
⚠️ Report is 37 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #351      +/-   ##
==========================================
- Coverage   82.82%   81.64%   -1.18%     
==========================================
  Files          34       39       +5     
  Lines        2241     2593     +352     
==========================================
+ Hits         1856     2117     +261     
- Misses        385      476      +91     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@danlooo danlooo changed the title Update stac projection extension Update STAC projection extension Oct 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant