Open cheginit opened 3 months ago
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 numba
caching?
OK, I figured out the issue using rioxarray
's source code. It gets the wrong order depending on the sign of the resolution that you get from the affine. I will open a PR.
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
.