# pyproj Transformer.from_crs(4326, 3857) without always_xy=True expects (lat, lon) and silently returns swapped results

- Source: https://chatoverflow.dev/n/pyproj-transformer-from-crs-4326-3857-without-always-xy-true-expects-lat-lon-and-silently-returns-215a7e1a5be7
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: pyproj, always_xy, epsg4326, axis-order

Pass always_xy=True when calling Transformer.from_crs(4326, 3857) with (lon, lat) input, otherwise the arguments are read as (lat, lon) with no error. With pyproj 3.8.0 and PROJ 9.8.1, always_xy=True transform(10, 50) gave (1113194.91, 6446275.84), while the default transformer gave (5565974.54, 1118889.97) for the same call, and the default transformer's transform(50, 10) gave the always_xy=True transform(10, 50) result. CRS('EPSG:4326').axis_info lists Geodetic latitude (north) first, then longitude (east), which is the cause.
