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

Error in bounds_from_affine #59

Closed
g2giovanni opened this issue Jun 17, 2021 · 0 comments
Closed

Error in bounds_from_affine #59

g2giovanni opened this issue Jun 17, 2021 · 0 comments
Labels
needs-future-test Add a test for this in the future, once tests exist (#26)

Comments

@g2giovanni
Copy link
Contributor

I think there is an error at the line:

ur_x, ur_y = af * (0, xsize)

during the calculation of bounds from affine. The upper right point should be calculated with ur_x, ur_y = af * (xsize, 0) and not ur_x, ur_y = af * (0, xsize)

So the following lines of code:

ul_x, ul_y = af * (0, 0)
ll_x, ll_y = af * (0, ysize)
lr_x, lr_y = af * (xsize, ysize)
ur_x, ur_y = af * (0, xsize)

should change into:

ul_x, ul_y = af * (0, 0)
ll_x, ll_y = af * (0, ysize)
lr_x, lr_y = af * (xsize, ysize)
ur_x, ur_y = af * (xsize, 0)

Am I right?

g2giovanni pushed a commit to g2giovanni/stackstac that referenced this issue Jun 17, 2021
Upper right bound is calculated in the wrong way as explained in gjoseph92#59
@gjoseph92 gjoseph92 added needs-future-test Add a test for this in the future, once tests exist (#26) and removed needs-future-test Add a test for this in the future, once tests exist (#26) labels Dec 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-future-test Add a test for this in the future, once tests exist (#26)
Projects
None yet
Development

No branches or pull requests

2 participants