Closed clausmichele closed 10 months ago
Hmm, the preview image should be ignored, I think. It's just a preview. proj is not required in STAC so it might always happen that some STAC data can't be loaded. Ideally it's in the metadata though as otherwise you may need to specify it per asset (e.g. the S2 bands have different resolutions) and that quickly gets complicated.
Note that it's indeed quite common for stac metadata to be incomplete. The fallback is to get resolution information from the actual raster. This is of course slower, we often make the assumption that we can fetch metadata from the first raster, and that it's the same for other rasters that are loaded. (This is not always true, and then you get an error.) What we also do is inferring a target resolution and crs from resample_spatial or resample_cube_spatial.
Does this solve the issue? If not, let me know an I can reopen.
Hi @m-mohr, fine to close this for the moment. For some collections another workaround is to filter directly using the gsd
property.
I'm trying to implement
load_stac
in openeo-processes-dask https://github.com/Open-EO/openeo-processes-dask/pull/127.The main libraries we could use to perform the stac to xArray bridge are
stackstac
andodc-stac
. I'm currently usingstackstac
since it provides better support for metadata, but it would be possible to useodc-stac
as well without much effort.I'm currently facing this issue, which occurs if a STAC Collection and Items are valid but do not provide enough details to establish automatically the data resolution:
I am currently testing against https://planetarycomputer.microsoft.com/api/stac/v1/collections/sentinel-2-l2a
I was wondering if this is a common scenario. Is the proj extension is mandatory or not? If not, would it make sense to allow to pass a resolution parameter to overcome this?
cc @soxofaan @m-mohr @LukeWeidenwalker