aboutsummaryrefslogtreecommitdiff
path: root/man/man3/geodesic.3
diff options
context:
space:
mode:
authorFrank Warmerdam <warmerdam@pobox.com>2013-05-16 06:22:25 +0000
committerFrank Warmerdam <warmerdam@pobox.com>2013-05-16 06:22:25 +0000
commit8d061d8042d3c74926af6e0edae7f64d287a617e (patch)
treeb767194cb4b1ce54565b7a89b7490ce1cb8b145f /man/man3/geodesic.3
parenta7bbac84cc8f3b2681d33ecf671a1ce81cee1072 (diff)
downloadPROJ-8d061d8042d3c74926af6e0edae7f64d287a617e.tar.gz
PROJ-8d061d8042d3c74926af6e0edae7f64d287a617e.zip
Added missing geodesic.3
git-svn-id: http://svn.osgeo.org/metacrs/proj/trunk@2335 4e78687f-474d-0410-85f9-8d5e500ac6b2
Diffstat (limited to 'man/man3/geodesic.3')
-rw-r--r--man/man3/geodesic.387
1 files changed, 87 insertions, 0 deletions
diff --git a/man/man3/geodesic.3 b/man/man3/geodesic.3
new file mode 100644
index 00000000..e409079d
--- /dev/null
+++ b/man/man3/geodesic.3
@@ -0,0 +1,87 @@
+.\" @(#)geodesic.3
+.nr LL 6.5i
+.TH GEODESIC 3 "2013/02/27 Rel. 4.8"
+.ad b
+.hy 1
+.SH NAME
+.B geod_init
+\- initialize an ellipsoid
+.br
+.B geod_lineinit
+\- initialize a geodesic line
+.br
+.B geod_position
+\- a position on a geodesic line
+.br
+.B geod_direct
+\- the direct geodesic problem
+.br
+.B geod_inverse
+\- the inverse geodesic problem
+.br
+.B geod_polygonarea
+\- the area of a polygon
+.br
+.SH SYNOPSIS
+.nf
+#include <geodesic.h>
+.br
+and link against the \fBproj\fR library.
+.SH DESCRIPTION
+This library is a port of the geodesic routines in the C++ library,
+GeographicLib, to C. It solves the direct and inverse geodesic problems
+on an ellipsoid of revolution. In addition, the reduced length of a
+geodesic and the area between a geodesic and the equator can be
+computed. The results are accurate to round off for |\fIf\fR| < 1/50.
+Note that the geodesic routines measure angles (latitudes, longitudes,
+and azimuths) in degrees, unlike the rest of the \fBproj\fR library,
+which uses radians. The documentation for this library is included in
+geodesic.h. A formatted version of the documentation is available at
+.br
+http://geographiclib.sf.net/html/C/index.html
+.SH EXAMPLE
+The following program reads in lines with the coordinates for two points
+in decimal degrees (\fIlat1\fR, \fIlon1\fR, \fIlat2\fR, \fIlon2\fR) and
+prints out \fIazi1\fR, \fIazi2\fR, \fIs12\fR for the geodesic line
+between each pair of points on the WGS84 ellipsoid. (N.B. \fIazi2\fR is
+the forward azimuth at point 2.)
+.nf
+\f(CW
+
+#include <stdio.h>
+#include <geodesic.h>
+
+int main() {
+ double a = 6378137, f = 1/298.257223563; /* WGS84 */
+ double lat1, lon1, azi1, lat2, lon2, azi2, s12;
+ struct geod_geodesic g;
+
+ geod_init(&g, a, f);
+ while (scanf("%lf %lf %lf %lf\en",
+ &lat1, &lon1, &lat2, &lon2) == 4) {
+ geod_inverse(&g, lat1, lon1, lat2, lon2,
+ &s12, &azi1, &azi2);
+ printf("%.8f %.8f %.3f\en", azi1, azi2, s12);
+ }
+ return 0;
+} \fR
+.br
+.fi
+.SH LIBRARY
+libproj.a \- library of projections and support procedures
+.SH SEE ALSO
+.B geod(1)
+.br
+The \fBGeodesicExact\fR class in \fBGeographicLib\fR,
+http://geographiclib.sf.net. This solves the geodesic problems in terms
+of elliptic integrals; the results are accurate for arbitrary \fIf\fR.
+.br
+C. F. F. Karney, \fIAlgorithms for Geodesics\fR,
+.br
+J. Geodesy \fB87\fR, 43-55 (2013);
+.br
+DOI: http://dx.doi.org/10.1007/s00190-012-0578-z,
+.br
+http://geographiclib.sf.net/geod-addenda.html.
+.SH HOME PAGE
+http://proj.osgeo.org