-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
load_stac: avoid dependency on eo:bands #762
load_stac: avoid dependency on eo:bands #762
Comments
Yes, I've been considering this as a best-effort approach. The implicit assumption then is that those are single band assets. |
Maybe worth mentioning that in the python client we're also started to collect functionality to parse band information from stac:
We might want to consolidate efforts here |
Any STAC collection I can test this with @jdries? Was it Joris C. who needs this feature and should I ask him? |
Related: Open-EO/openeo-processes#488 |
@bossie it is about the Sentinel 1 Mosaics collection, example product here: https://radiantearth.github.io/stac-browser/#/external/catalogue.dataspace.copernicus.eu/stac/collections/GLOBAL-MOSAICS/items/Sentinel-1_DH_mosaic_2023_M08_13XDE_0_0?.asset=asset-PRODUCT But for further details on the STAC collection, please refer to @VictorVerhaert, he initially checked the collection and identified this issue. Background info: https://dataspace.copernicus.eu/news/2024-8-6-announcing-sentinel-1-monthly-mosaics-copernicus-data-space-ecosystem |
Seems to work if asset key matches the band name in the asset, however: netCDF batch job results:
test sentinel-2-l2a STAC API:
GLOBAL-MOSAICS STAC API:
|
As discussed with regards to GLOBAL-MOSAICS: avoid bad STAC API at https://catalogue.dataspace.copernicus.eu/stac; instead expose this as regular collection backed by https://catalogue.dataspace.copernicus.eu/resto/api/collections/GLOBAL-MOSAICS/search.json?platform=SENTINEL-1 A new, better STAC API is under way. |
Exposed experimental collection SENTINEL1_GLOBAL_MOSAICS, needs proper metadata. |
This process graph for the whole of 2023* works on dev and returns 12 assets, as expected: {
"process_graph": {
"loadcollection1": {
"arguments": {
"bands": [
"VV",
"VH"
],
"id": "SENTINEL1_GLOBAL_MOSAICS",
"spatial_extent": {
"east": 116.677065365837,
"north": 33.88922021846574,
"south": 33.81885394464797,
"west": 116.56835783699199
},
"temporal_extent": [
"2022-12-31T23:59:59Z",
"2024-01-01T00:00:00Z"
]
},
"process_id": "load_collection"
},
"saveresult1": {
"arguments": {
"data": {
"from_node": "loadcollection1"
},
"format": "GTiff",
"options": {}
},
"process_id": "save_result",
"result": true
}
}
} *the API seems to have a quirk in that the start date is considered exclusive (hence |
* works if asset key matches the band name #762 * clean it up #762 * support test STAC API #762 * fix tests The presence of "eo:bands" is still a good indicator of a band asset. #762 * add test for STAC API with assets that lack eo:bands #762 * fixup! add test for STAC API with assets that lack eo:bands #762 * adapt CHANGELOG #762
In addition to the new SENTINEL1_GLOBAL_MOSAICS collection, the original issue has been addressed in that:
|
data_cube = (connection
.load_stac("https://test-stac-api/collections/sentinel-2-l2a",
spatial_extent={"west": 13.59, "south": 49.56, "east": 13.73, "north": 49.80},
temporal_extent=["2024-03-28T10:06:30.000Z", "2024-03-28T10:06:32.000Z"],
bands=["AOT_60m", "B01_60m", "B01_20m"])
.save_result("GTiff")) |
@bossie is that load stac url correct? It doesn't seem like a proper URL, or is that simply one that is mocked in the tests? |
When loading our own netcdf metadata, I get:
No band assets found in items; a band asset requires an "eo:bands" property with a "name".
While the use of the name in eo:bands is relevant, all stac assets also have a default name, because assets in STAC are represented by a dictionary.
Can we fall back to those names, if eo:bands is not present? I think that would make our load_stac less extension dependent.
The text was updated successfully, but these errors were encountered: