Closed adampowerdeciphex closed 5 months ago
For prior art, see https://gdal.org/api/raster_c_api.html#_CPPv424GDALComposeGeoTransformsPKdPKdPd.
But I don't understand, why do you say it's right-to-left? It looks left-to-right to me (composed
is equivalent to translate
, then scale
).
Sorry I should have mentioned that the final assert here fails.
The expected result would be Point::new(8., 0.)
, but instead produces Point::new(5., 0.)
Fixed in #1196 - please take a look. Thank you for catching this and providing a test!
Fantastic, thanks for the quick fix! 😃
When composing multiple AffineTransforms, one would expect that the composed transform is the equivalent of applying the individual transforms from left to right. Instead it is the same as applying right to left.
The solution would be to reverse the matrix multiplication of the compose() function. Alternatively this could be made clear in the docs as there may be people that depend on this right to left behaviour.
Sample code