Skip to content
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

Multidimensional coordinnates is not supported #216

Open
Berhinj opened this issue Sep 6, 2023 · 2 comments · May be fixed by #222 or #230
Open

Multidimensional coordinnates is not supported #216

Berhinj opened this issue Sep 6, 2023 · 2 comments · May be fixed by #222 or #230

Comments

@Berhinj
Copy link

Berhinj commented Sep 6, 2023

Stackstac.stack outputs an xarray with coordinates that can be either along band or time dimension but not both.
In the case where an asset has properties which is fluctuates based on the timestamp, stackstac supposedly drops that variable (I've seen cases where it actually picks only one of the values and associates it to the band dimension - but that's not my issue's topic).

However, coordinates typically like landsat 8/9 L1 radiance_mult etc. are very common and are supposed to be different per band and time.

I've already deep-dived into the accumulate_metadata.py and it doesn't seem suited for such cases. I've tried to integrate it by making minimal changes but I'm afraid the full accumulate_metadata.py would better be rewritten from scratch.

Would you be open to such by changes? Would you have a prefered way of proceeding? Should I just open a PR with my suggestion?

@gjoseph92 gjoseph92 linked a pull request Sep 19, 2023 that will close this issue
@gjoseph92
Copy link
Owner

Sorry I forgot to reply here, but in general yes, I'm in favor of supporting this if possible. Thanks for opening #222!

@gjoseph92 gjoseph92 linked a pull request Nov 30, 2023 that will close this issue
@cboettig
Copy link

cboettig commented Jan 7, 2024

@gjoseph92 apologies if I'm miss-understanding, but would this address the ability to read multiband assets? I see in

raise RuntimeError(
f"Assets must have exactly 1 band, but file {self.url!r} has {nr_of_bands}. "
"We can't currently handle multi-band rasters (each band has to be "
"a separate STAC asset), so you'll need to exclude this asset from your analysis."
)

This prevents, e.g. reading most netcdf files in from stac, despite the fact that GDAL has good support for them, eg like so. (sorry I'm coming from the R language where we our 'stackstac'-like package, gdalcubes, is used like this all the time, and still learning my way around in python)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants