gjoseph92 / stackstac

Turn a STAC catalog into a dask-based xarray
https://stackstac.readthedocs.io
MIT License
238 stars 49 forks source link

Fix scale and offset application when only one is available. #183

Closed sharkinsspatial closed 1 year ago

sharkinsspatial commented 1 year ago

I noted this issue recently when working with several datasets which have scales=(0.0001,) but offsets=(0.0,) resulting in the default rescale=True not applying the scale value.

To facilitate future testing of rio_reader functionality, I'd also propose incorporating some file based integration tests similar to those used in rioxarray which might cover these types of edge cases.