3
.TH GEODESIC 3 "2014/12/17 Rel. 4.9.0"
8
\- initialize an ellipsoid
11
\- initialize a geodesic line
14
\- a position on a geodesic line
17
\- the direct geodesic problem
20
\- the inverse geodesic problem
23
\- the area of a polygon
29
and link against the \fBproj\fR library.
31
This library is a port of the geodesic routines in the C++ library,
32
GeographicLib, to C. It solves the direct and inverse geodesic problems
33
on an ellipsoid of revolution. In addition, the reduced length of a
34
geodesic and the area between a geodesic and the equator can be
35
computed. The results are accurate to round off for |\fIf\fR| < 1/50,
36
where \fIf\fR is the flattening. Note that the geodesic routines
37
measure angles (latitudes, longitudes, and azimuths) in degrees, unlike
38
the rest of the \fBproj\fR library, which uses radians. The
39
documentation for this library is included in geodesic.h. A formatted
40
version of the documentation is available at
41
http://geographiclib.sf.net/1.40/C
43
The following program reads in lines with the coordinates for two points
44
in decimal degrees (\fIlat1\fR, \fIlon1\fR, \fIlat2\fR, \fIlon2\fR) and
45
prints out \fIazi1\fR, \fIazi2\fR, \fIs12\fR for the geodesic line
46
between each pair of points on the WGS84 ellipsoid. (N.B. \fIazi2\fR is
47
the forward azimuth at point 2.)
55
double a = 6378137, f = 1/298.257223563; /* WGS84 */
56
double lat1, lon1, azi1, lat2, lon2, azi2, s12;
57
struct geod_geodesic g;
60
while (scanf("%lf %lf %lf %lf\en",
61
&lat1, &lon1, &lat2, &lon2) == 4) {
62
geod_inverse(&g, lat1, lon1, lat2, lon2,
64
printf("%.8f %.8f %.3f\en", azi1, azi2, s12);
71
libproj.a \- library of projections and support procedures
73
Full online documentation for \fBgeodesic(3)\fR,
75
http://geographiclib.sf.net/1.40/C
79
\fBGeographicLib\fR, http://geographiclib.sf.net
81
The \fBGeodesicExact\fR class in GeographicLib solves the geodesic
82
problems in terms of elliptic integrals; the results are accurate for
85
C. F. F. Karney, \fIAlgorithms for Geodesics\fR,
87
J. Geodesy \fB87\fR, 43-55 (2013);
89
DOI: http://dx.doi.org/10.1007/s00190-012-0578-z
91
http://geographiclib.sf.net/geod-addenda.html
93
The \fIonline geodesic bibliography\fR,
95
http://geographiclib.sf.net/geodesic-papers/biblio.html