You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Following this thread, when using reproject for a 2-D DataArray, after explicitly setting NoData value using write_nodata, Resampling.average can correctly calculate the average of all non-Nodata pixels.
However, this seems not to work for a 3-D DataArray. reproject will propagate nan value, instead of calculating the average of all non-Nodata pixels, even after setting the NoData value. Here is an example:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Following this thread, when using
reproject
for a 2-D DataArray, after explicitly setting NoData value usingwrite_nodata
,Resampling.average
can correctly calculate the average of all non-Nodata pixels.However, this seems not to work for a 3-D DataArray.
reproject
will propagate nan value, instead of calculating the average of all non-Nodata pixels, even after setting the NoData value. Here is an example:foo
:foo_resampled
:What I expected for
foo_resampled
:Does that imply
reproject
can only correctly handle Nan value in 2-D case? I appreciate any suggestions or helps.Beta Was this translation helpful? Give feedback.
All reactions