-
Notifications
You must be signed in to change notification settings - Fork 195
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
Wrong bbox when using ViewFinder
#250
Comments
Thanks for looking into this. Would you be willing to submit a PR? |
For some reason, it's working fine now. I created a fresh env to get ready for a PR and noticed that it's working correctly now. I don't know what was wrong before, since I didn't change anything except for creating a new env. Maybe it has to do with |
OK, I figured out the issue using |
…otation or the resolution is negative. Fixes mdbartos#250
…otation or the resolution is negative. Fixes mdbartos#250
I am using
ViewFinder
to create a raster directly from anxarray.dataarray
, like so:However, this gets the values of
ymin
andymax
inbbox
incorrectly. This leads to getting an error when checking if a pour point is within the bounds of the data.Here's the code to reproduce:
With this, for
viewfinder.bbox
, we get(318703.875925, 289473.8516750001, 340293.6259030001, 273852.257894)
while it should be(318703.875925, 273852.257894, 340293.62590300007, 289473.85167500016)
.The issue seems to be with the
bbox
property ofViewFinder
:That I think should be:
For your reference, my
affine
version is2.4.0
.The text was updated successfully, but these errors were encountered: