SpatioTemporal / STAREPandas

STAREpandas adds SpatioTemporal Adaptive Resolution Encoding (STARE) support to pandas DataFrames. https://starepandas.readthedocs.io/en/latest/
MIT License
5 stars 1 forks source link

read several MOD09 resolutions at the same time #112

Closed NiklasPhabian closed 2 years ago

NiklasPhabian commented 2 years ago

With granules containing multiple resolutions at the same time (MOD09), we might sometimes be interested in pulling them all at once in a data frame. Both downsampling the higher resolution and upsampling the lower resolution might be interesting.

For now, I really need to load the 1km_Reflectance_Data_State_QA to be loaded alongside the 500 m surface reflectances.

I will upsample the 1km band and simply repeat the values. This is technically not correct as actually 6 500 m iFOVs intersect a single 1 km iFOV. But it will suffice for now.

x = numpy.array([[1,2,3], [5,6,7]])
y = x.repeat(2, axis=0)
y.repeat(2, axis=1)

It would probably be a little bit more elegant to read both resolutions separately and then spatially join them. But our generation of the 500 m resolution geolocation is a hack in the first place ...

NiklasPhabian commented 2 years ago

somehow solved with 15ca9fd4eba9925aaf26049c0a1c0fa4cd4937dd