rasterio / affine

Affine transformation matrices
https://affine.readthedocs.io/en/latest/index.html
BSD 3-Clause "New" or "Revised" License
159 stars 28 forks source link

Incorrect computation in `itransform` #40

Closed Kirill888 closed 5 years ago

Kirill888 commented 5 years ago

I believe that itransform is incorrect for Affine matrices that have rotation/shear

I assume that A.itransform(pts) is equivalent to:

 pts = [A*pt for pt in pts]

It's not for affine transforms that have non-zero off-diagonal entries.

I think on this line sd <-> sb are swapped https://github.com/sgillies/affine/blob/b125a6397c2a0ff4d7587a43b8678ee5f54765ed/affine/__init__.py#L519

Unit test only checks with scale only matrix.