Skip to content
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

[Bug]: Exported pixel coordinate do not match the underlying raster pixel coordinate #215

Open
1 task done
shahriar49 opened this issue Jan 12, 2025 · 0 comments
Open
1 task done
Labels
bug Something isn't working triage A new issue that needs to be triaged

Comments

@shahriar49
Copy link

Bug Summary

It seems that when running open_dataset with a given geometry, it assume the upper-left corner of the geometry to be the upper-left corner of the pixel to download, which is not necessarily true. Geometry may not align with the raster pixel boundaries and this causes the assigned lat/lon in xarray to be inaccurate.
I tried to use the coveringGrid() function to obtain an export region geometry that is aligned to raster pixels. For a very small area this fix will work, but the coveingGrid() quickly causes GEE out of memory error when executes over bigger areas because there will be too many grid cells to cover hundreds by hundreds pixels for a medium of high resolution dataset.
Here is my notebook code:
https://colab.research.google.com/drive/1kwtIT1Jjw-bwHMppm2-JUfHgGtDzhNlD?usp=sharing

Steps to Reproduce

https://colab.research.google.com/drive/1kwtIT1Jjw-bwHMppm2-JUfHgGtDzhNlD?usp=sharing

Current Behavior

Extracted lat/lon in xarray may be inaccurate.

Expected Behavior

Extracted lat/lon in xarray accurately align with raster pixel center.

Relevant log output

Xee Version

0.0.19

Contact Details

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@shahriar49 shahriar49 added bug Something isn't working triage A new issue that needs to be triaged labels Jan 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage A new issue that needs to be triaged
Projects
None yet
Development

No branches or pull requests

1 participant