Proj.jl icon indicating copy to clipboard operation
Proj.jl copied to clipboard

Invalid order of arguments passed to geod_inverse()

Open himotoyoshi opened this issue 2 months ago • 0 comments

The definition of the function Proj.geod_inverse() in geod.jl is as follows.

function geod_inverse(g::geod_geodesic, lat1::Real, lon1::Real, lat2::Real, lon2::Real)
    s12 = Ref{Cdouble}(NaN)
    azi1 = Ref{Cdouble}(NaN)
    azi2 = Ref{Cdouble}(NaN)

    geod_inverse(Ref(g), lat1, lat2, lon1, lon2, s12, azi1, azi2)

    return s12[], azi1[], azi2[]
end

However, I think the correct order of arguments passed to the (inner) geod_inverse() function should be

    geod_inverse(Ref(g), lat1, lon1, lat2, lon2, s12, azi1, azi2)

himotoyoshi avatar Apr 16 '24 01:04 himotoyoshi