[Proj] Distance between pair of lat / lons

Charles Karney charles.karney at sri.com
Thu Dec 27 09:35:48 EST 2012

The "standard" geodesic problem models the earth as an ellipsoid.  As
Janne points out this is only an approximation and many other effects
may enter into the computation of practical distances (geoid separation,
terrain elevation, winds, tides, air corridors, etc.).

Nevertheless, there are applications using using the mathematical model
of the ellipsoid makes sense.  Maritime boundaries are defined in terms
of geodesic distances on a ellipsoid.  Likewise competitive air races
sometimes use the same definition of distances.

Of more relevance to this group, in modeling terrestrial data on a 2-d
surface (e.g., map making!), the ellipsoid is the standard reference
datum.  In this simplified 2-d world the geodesic distance represents
the "true" distance and being able to compute it quickly and accurately
is obviously useful.  A rule of thumb for computations involving
physical data is that you should carry out the internal calculations
with twice as many digits as used to represent the external data.
Asking for full double precision accuracy in such calculations (i.e.,
accuracy to a few nm) is by no means silly.


On 12/27/2012 05:38 AM, support.mn at elisanet.fi wrote:
> Hello,
> yes, but what a distance?
> If you are considering short distances where the most accuracy is usually
> required (when building something up to ocean shpis) they do not need
> any ellipsoids but straight lines from point to point (and maybe additionally
> use lasers to verify them) and if you just give them arcs of accuracy nm you
> might be totally in a wrong ball park?
> So one needs at least two (or more) distances:
> 1) Straight line
> 2) Earth ellipsoidal length which can compensate for different heights above it
> 3) Some length that does not compensate for any elevations (this might be the
> one you have been used to use)
> 4) A length that follows the earth surface curvatures
> 5) Maybe some more definitions for some applications
> An additional point is that most users do not know their accurate elevation
> above any ellipsoid but above the geoid (or some local MSL) so that will
> add additional variables to the formula.
> So to tell the actual distance between two lat/lons in nm region is not so
> simple problem - or the answer is anyway wrong (since the question is
> not accurate enough).
> Janne.

More information about the Proj mailing list