Open-EO / openeo-processes-python

A Python representation of (most) openEO processes
Apache License 2.0
11 stars 4 forks source link

Remove .stack() from aggregate spatial #156

Closed LukeWeidenwalker closed 2 years ago

LukeWeidenwalker commented 2 years ago

Discovered that xarray.stack loads the data into memory (https://github.com/pydata/xarray/issues/4113). aggregate spatial can work without flattening the data first, so this reorganises it to avoid .stack. Also I've added a fix to make sure the mask always has the correct crs set.