New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.geobox
property not defined for single pixel arrays
#752
Comments
I think @uchchwhash was working on a fix for this, you should check with him |
@andrewdhicks thanks I'm aware, hence this issue, unfortunately proposed changes in this branch https://github.com/opendatacube/datacube-core/tree/virtual-product-reproject would break xx = dc.load(.., resolution=(-10,10))
xx.nbar_red[:, ::2,::2].geobox.resolution == (-20, 20) instead it would return |
Might have to be addressed as part of #519 |
I couldn't find a clean and neat way to fix this as part of Bug squash 2019. I attempted to persist the updated resolution (non-native xarray metadata) attribute but does not seem to be propagated through the xarray native operations. I also attempted to use One solution I found is to override xarray's slice operator within ODC codebase to update this information but is fragile. |
Just making a note that the NetCDF CF convention prescribes:
As clunky as it is, at least it is a convention. I did not like it when I first saw it, but now I am humbler. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Expected behaviour
Actual behaviour
Instead get
(nan, nan)
Why
Resolution is computed from axis values, when there is only one axis value resolution can not be inferred as you need at least 2 axis values to compute "step"
datacube-core/datacube/utils/math.py
Line 105 in d0ec48c
In the code above resolution will be computed to be
0/0
which isnan
.The text was updated successfully, but these errors were encountered: