You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fiona.transform.transform exhibits different behavior based on the underlying gdal library installed.
Expected behavior and actual behavior.
If I run fiona.transform.transform("epsg:4326", "epsg:3857", [-75.71], [38.06]) I expect to get: ([-8427998.647958742], [4587905.271362515]) regardless of library version, however with gdal 3.0.2 and fiona 1.8.13.post1 I get the incorrect result.
In particular, the xs, ys position are swapped in the arguments, i.e. if I run fiona.transform.transform("epsg:4326", "epsg:3857", [38.06], [-75.71]) then I do get the correct result.
Thanks for the report @calebrob6 . In another issue I'm recommending that users switch, if they can, to "OGC:CRS84" with GDAL 3 instead of expecting the old defaults for "EPSG:4326". But that doesn't mean that we won't have to do something about this.
However, the output using GDAL 3.0.4, PROJ 6.3.2 and 7.1.0, pyproj 1.9.6 and 2.6.1.post1 swaps the axis on the fiona output not using rasterio.crs.CRS:
fiona.transform.transform exhibits different behavior based on the underlying gdal library installed.
Expected behavior and actual behavior.
If I run
fiona.transform.transform("epsg:4326", "epsg:3857", [-75.71], [38.06])
I expect to get:([-8427998.647958742], [4587905.271362515])
regardless of library version, however with gdal 3.0.2 and fiona 1.8.13.post1 I get the incorrect result.In particular, the
xs
,ys
position are swapped in the arguments, i.e. if I runfiona.transform.transform("epsg:4326", "epsg:3857", [38.06], [-75.71])
then I do get the correct result.@snowman2 suggested that this could be related to a PYPROJ issue, pyproj4/pyproj#538 (see https://fiona.groups.io/g/main/topic/75506516#60 for comments).
Steps to reproduce the problem.
If I switch the lat/lon position then I get the correct result (http://epsg.io/transform#s_srs=4326&t_srs=3857&x=-75.7169053&y=38.0624956):
If I instead do the conda install with a gdal version less than 3 I get the expected result:
Operating system
I have tested this with conda on Windows 10 and Ubuntu 18.04.
Fiona and GDAL version and provenance
@snorfalorpagus has reproduced with different versions on Travis - https://travis-ci.org/github/snorfalorpagus/Fiona/builds/708143904.
The text was updated successfully, but these errors were encountered: