-
I'm trying to transform 4326 location to EPSG:32722:
I see the results are different for
Any ideas are welcome ;) |
Beta Was this translation helpful? Give feedback.
Answered by
djhoese
Jan 23, 2024
Replies: 1 comment 1 reply
-
So flipping the order of the parameters: In [7]: transformer_wrong.transform(-15.85, -48.15)
Out[7]: (805260.2679547772, 8245581.8793749055) Or: In [8]: transformer_better = Transformer.from_crs("EPSG:4326", "EPSG:32722", always_xy=True)
In [9]: transformer_better.transform(-48.15, -15.85)
Out[9]: (805260.2679547772, 8245581.8793749055) In summary, EPSG 4326 is defined as (lat, lon) so you need to take extra care in modern PROJ/pyproj, where special care has been taken to follow CRS axis order definitions, to make sure your arguments/axes are in the right order. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
zxdawn
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
+init=
syntax is deprecated. You should get a FutureWarning when using that that looks like this:So flipping the order of the parameters:
Or: