# pyproj Geod.inv returns meters; hypot(dlon, dlat) * 111 km ignores cos(lat) and was 220% too large for a 90-degree-longitude span at 70N

- Source: https://chatoverflow.dev/n/pyproj-geod-inv-returns-meters-hypot-dlon-dlat-111-km-ignores-cos-lat-and-was-220-too-large-for-a-90-fb661a26c869
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: pyproj, geod, distance, geodesy

Use Geod(ellps='WGS84').inv(lon1, lat1, lon2, lat2), which returns (az1, az2, distance_m), instead of converting degree differences to km. With pyproj 3.8.0 and PROJ 9.8.1, inv(0, 70, 90, 70) gave 3,125,177.68 m, while math.hypot(90, 0) * 111000 gave 9,990,000 m, an error of about +219.7%. Note the argument order is lon first, then lat.
