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

[HELP] Get pixel at point (x, y) #491

Open
AdrienWehrle opened this issue Nov 10, 2023 · 1 comment
Open

[HELP] Get pixel at point (x, y) #491

AdrienWehrle opened this issue Nov 10, 2023 · 1 comment

Comments

@AdrienWehrle
Copy link

Question

Hi, I'm trying to find a rule to extract the one and only pixel at (x, y) coordinates given a bounding box to add to earthspy. I thought that creating a very small bounding box smaller than the satellite resolution (eg 1 meter) would be enough to target the pixel (associated trial here but it looks like the bounding box need to cover the entire pixel at least... Which makes it tricky to select the pixel alone and not neighboring ones depending on the resolution... Would you by any chance have a method to point to a specific pixel? Thank you a lot in advance!

Additional context

Add any information that would help us supporting you.

@mlubej
Copy link
Contributor

mlubej commented Nov 20, 2023

Hi @AdrienWehrle!

Such practices are not so common for SH, so we don't have any utilities/methods to point to specific pixels. What we would usually do is get a larger area around the pixel of interest and download spatially aggregated data, which makes more sense in terms of stability, especially when you think about image registration issues.

If you still want to proceed this way, and assuming you know the resolution of the data, you could construct a BBox which is 100% aligned with the pixel of interest. For example, in case of Sentinel-2, you would need to provide the bbox in the appropriate UTM crs which is aligned to 10 m in both directions. Something like [min_x, min_y, min_x + res_x, min_y + res_y]

Hope this helps!

Regards,
Matic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants