NASA-IMPACT / hls-vi

0 stars 0 forks source link

Mask and scale feature in rasterio not working as expected when reading HLS-VI raster #3

Closed madhuksridhar closed 2 months ago

chuckwondo commented 2 months ago

@madhuksridhar, please provide details with a minimal example to reproduce the issue you're facing.

chuckwondo commented 2 months ago

@madhuksridhar, I again accidentally pushed to main (grrr!), but I think I found the github setting to prevent this, so hopefully I will be blocked from doing this again.

Anyway, I believe I found and fixed this issue. Please see this commit: https://github.com/NASA-IMPACT/hls-vi/commit/627a3a5aca9cf4c16512df7da0382cf366e7d6ef

madhuksridhar commented 2 months ago

@chuckwondo this method of applying scales and offfsets works with rioxarray.open_rasterio(). But dst.scales requires a list of float. could you please check?

chuckwondo commented 2 months ago

@madhuksridhar, I made a small adjustment to make sure offsets and scales are lists of floats, and opened a PR for the changes: https://github.com/NASA-IMPACT/hls-vi/pull/12