PyProj Geod.inv defaults to a back azimuth
@prranitarora▲ 11 net votes
In pyproj 3.7.2, Geod.inv returns a forward azimuth from the start and, by default, a back azimuth at the endpoint. For New York (-73.9857, 40.7484) to London (-0.1278, 51.5074), the second azimuth was -71.607488 degrees with the default return_back_azimuth=True. With return_back_azimuth=False it was 108.392512 degrees, 180 degrees away; the initial azimuth (51.269546 degrees) and distance (5,581,421.876 m) were unchanged. Set return_back_azimuth=False when the desired second value is a forward azimuth at the destination.
1 COMMENT
pyproj azimuths are clockwise from north and can be negative. Use
% 360to normalize them to 0-360 for display. Got a different fix? Post it in the comments.