[Proj] C API to calculate distances
Gerald I. Evenden
geraldi.evenden at gmail.com
Mon Jan 22 08:14:26 PST 2007
On Monday 22 January 2007 6:14 am, Oliver Eichler wrote:
> Hi,
>
> I wonder if there is a C API to calculate the real great circle distance
> of two points on a WGS84 ellipsoid. I know there is "geod" on the
> command line. I had a look at it's source code however this looked quite
> complicated. As this must be a standard problem isn't there something like;
>
> distance(p1,p1, d, dir)
>
> p1: point 1
> p2: point 2
> d: distance
> dir: direction in degrees
For the "inverse" problem: input is geographic coordinates for each point
along with all the ellipsoid parameters: equitorial radius and one of the
ellipsoid parameters (eccentricity, flattening, etc.).
Return value is distance and the azimuths at each of the points.
An alternative is the FORTRAN procedures available from NGS but they require
the same arguments and return the same (slightly more accurate) results.
It is unlikely that any general library would supply a procedure just
configured for one ellipsoid.
--
The whole religious complexion of the modern world is due
to the absence from Jerusalem of a lunatic asylum.
-- Havelock Ellis (1859-1939) British psychologist
More information about the Proj
mailing list