-
Notifications
You must be signed in to change notification settings - Fork 18
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
Consider adding functionality like odc.geo.xr.replace_coords()
#134
Comments
We should try to keep same style as xarray api, they tend to use |
Possibly need to pass in dimension names too. Or to infer them, perhaps it's an implementation detail. |
currently, these are fixed to
and the proposed method should just delegate that part to Essentially what we want is |
odc.geo.xr.replace_coords()
odc.geo.xr.replace_coords()
Is this issue mostly resolved by the addition of If so, we might want to add a little extra to those docstrings to explain how it could be used in a scenario like this. |
I don't think so, @robbibt. Sometimes automatic coordinate loading leads to bad numbers due to floating point precision. (i.e., So explicitly setting the geobox, although it's dangerous, is useful sometimes. |
So does something like: xx = xx.assign_coords(odc.geo.xr.xr_coords(actual_geobox_you_want)) do what you need in this case @alexgleith |
I guess I don't understand why you need to The problem of "I put one geobox in, but what I'm getting back is slightly different" should have been fixed by recent changes that take more care to re-use original affine matrix where possible instead of recomputing from coordinate data. |
It was throwing an error before. Looks like it's not required now, which is nice. |
There seems to be a geobox per variable now, @Kirill888
|
Reported over here #157 |
Current options to write data out with a different definition of geobox coordinates include either:
a) using the private method
b) assigning coordinates, which has a fixed coordinate name
So having a functionality that can safely do with without compromise or complexity would be nice.
The text was updated successfully, but these errors were encountered: