Hello Thierry
Le 23/10/2019 à 01:10, Thierry Danard a écrit :
I noticed a surprising behavior, I do not know whether this is a bug,
or whether it's expected: I found that when the order of the AXIS
attributes is changed, the conversion returns different results
(...snip...) If I change the WKT from "AXIS["X",EAST],
AXIS["Y",NORTH]]" to "AXIS["Y",NORTH], AXIS["X",EAST]]" I get a
different, incorrect result.
This is expected. The AXIS attributes that are swapped in the test are
the axes of the source CRS ("fromCRS"). Those axes define the expected
order of coordinates given to the "transform" methods. If the AXIS
attributes of the source CRS are swapped, then the input coordinate
values need to be swapped to. In the following part of the test:
double y = 1934615.424;
double x = 506052.281;
Just rename "y" as "x" and "x" as "y", and we are back on the expected
results.
Regards,
Martin