Return the bearing between two geography points.
The formulae used are the following:
- lat = sin(Δlong).cos(lat2)
- long = cos(lat1).sin(lat2) - sin(lat1).cos(lat2).cos(Δlong)
- θ = atan2(lat, long)
- Note
- Derived from https://gist.github.com/jeromer/2005586
-
In PostGIS, for geodetic coordinates, X is longitude and Y is latitude