-
Notifications
You must be signed in to change notification settings - Fork 523
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
Use epsilon when comparing to 0 #2568
base: main
Are you sure you want to change the base?
Conversation
Decided to use |
I'm getting a confusing result when using from affine import identity
from rasterio.transform import array_bounds
t = identity.translation(2, 3)
width, height = 10, 10
array_bounds(height, width, t)
# (2, 13.0, 12.0, 3) I would expect the bounds to be EDIT: It looks like the identity transform is south-up. Any north-up transform involves a reflection (ie. e < 0). |
This should address an issue found when investigating #2565.
A tolerance needs to be considered in the comparison affine coefficients to 0.
I'm not entirely sure where the best place to test this would be. My initial though was to add a test to test_read.py.