1GEOD(1) PROJ GEOD(1)
2
3
4
6 geod - Geodesic computations
7
9 geod +ellps=<ellipse> [-afFIlptwW [args]] [+opt[=arg] ...] file ...
10
11 invgeod +ellps=<ellipse> [-afFIlptwW [args]] [+opt[=arg] ...] file
12 ...
13
15 geod (direct) and invgeod (inverse) perform geodesic (Great Circle)
16 computations for determining latitude, longitude and back azimuth of a
17 terminus point given a initial point latitude, longitude, azimuth and
18 distance (direct) or the forward and back azimuths and distance between
19 an initial and terminus point latitudes and longitudes (inverse). The
20 results are accurate to round off for |f| < 1/50, where f is flatten‐
21 ing.
22
23 invgeod may not be available on all platforms; in this case use geod -I
24 instead.
25
26 The following command-line options can appear in any order:
27
28 -I Specifies that the inverse geodesic computation is to be per‐
29 formed. May be used with execution of geod as an alternative to
30 invgeod execution.
31
32 -a Latitude and longitudes of the initial and terminal points, for‐
33 ward and back azimuths and distance are output.
34
35 -t<a> Where a specifies a character employed as the first character to
36 denote a control line to be passed through without processing.
37
38 -le Gives a listing of all the ellipsoids that may be selected with
39 the +ellps= option.
40
41 -lu Gives a listing of all the units that may be selected with the
42 +units= option. (Default units are meters.)
43
44 -f <format>
45 Where format is a printf format string to control the output
46 form of the geographic coordinate values. The default mode is
47 DMS.
48
49 -F <format>
50 Where format is a printf format string to control the output
51 form of the distance value. The default mode is "%.3f".
52
53 -w<n> Where n is the number of significant fractional digits to employ
54 for seconds output (when the option is not specified, -w3 is as‐
55 sumed).
56
57 -W<n> Where n is the number of significant fractional digits to employ
58 for seconds output. When -W is employed the fields will be con‐
59 stant width with leading zeroes.
60
61 -p This option causes the azimuthal values to be output as unsigned
62 DMS numbers between 0 and 360 degrees. Also note -f.
63
64 The +opt command-line options are associated with geodetic parameters
65 for specifying the ellipsoidal or sphere to use. controls. The options
66 are processed in left to right order from the command line. Reentry of
67 an option is ignored with the first occurrence assumed to be the de‐
68 sired value.
69
70 See the PROJ documentation for a full list of these parameters and con‐
71 trols.
72
73 One or more files (processed in left to right order) specify the source
74 of data to be transformed. A - will specify the location of processing
75 standard input. If no files are specified, the input is assumed to be
76 from stdin.
77
78 For direct determinations input data must be in latitude, longitude,
79 azimuth and distance order and output will be latitude, longitude and
80 back azimuth of the terminus point. Latitude, longitude of the initial
81 and terminus point are input for the inverse mode and respective for‐
82 ward and back azimuth from the initial and terminus points are output
83 along with the distance between the points.
84
85 Input geographic coordinates (latitude and longitude) and azimuthal
86 data must be in decimal degrees or DMS format and input distance data
87 must be in units consistent with the ellipsoid major axis or sphere ra‐
88 dius units. The latitude must lie in the range [-90d,90d]. Output geo‐
89 graphic coordinates will be in DMS (if the -f switch is not employed)
90 to 0.001" with trailing, zero-valued minute-second fields deleted. Out‐
91 put distance data will be in the same units as the ellipsoid or sphere
92 radius.
93
94 The Earth's ellipsoidal figure may be selected in the same manner as
95 program proj by using +ellps=, +a=, +es=, etc.
96
97 geod may also be used to determine intermediate points along either a
98 geodesic line between two points or along an arc of specified distance
99 from a geographic point. In both cases an initial point must be speci‐
100 fied with +lat_1=lat and +lon_1=lon parameters and either a terminus
101 point +lat_2=lat and +lon_2=lon or a distance and azimuth from the ini‐
102 tial point with +S=distance and +A=azimuth must be specified.
103
104 If points along a geodesic are to be determined then either +n_S=inte‐
105 ger specifying the number of intermediate points and/or +del_S=distance
106 specifying the incremental distance between points must be specified.
107
108 To determine points along an arc equidistant from the initial point
109 both +del_A=angle and +n_A=integer must be specified which determine
110 the respective angular increments and number of points to be deter‐
111 mined.
112
114 The following script determines the geodesic azimuths and distance in
115 U.S. statute miles from Boston, MA, to Portland, OR:
116
117 geod +ellps=clrk66 <<EOF -I +units=us-mi
118 42d15'N 71d07'W 45d31'N 123d41'W
119 EOF
120
121 which gives the results:
122
123 -66d31'50.141" 75d39'13.083" 2587.504
124
125 where the first two values are the azimuth from Boston to Portland, the
126 back azimuth from Portland to Boston followed by the distance.
127
128 An example of forward geodesic use is to use the Boston location and
129 determine Portland's location by azimuth and distance:
130
131 geod +ellps=clrk66 <<EOF +units=us-mi
132 42d15'N 71d07'W -66d31'50.141" 2587.504
133 EOF
134
135 which gives:
136
137 45d31'0.003"N 123d40'59.985"W 75d39'13.094"
138
139 NOTE:
140 Lack of precision in the distance value compromises the precision of
141 the Portland location.
142
144 1. GeographicLib.
145
146 2. C. F. F. Karney, Algorithms for Geodesics, J. Geodesy 87(1), 43–55
147 (2013); addenda.
148
149 3. A geodesic bibliography.
150
152 proj(1), cs2cs(1), cct(1), gie(1), projinfo(1), projsync(1)
153
155 A list of known bugs can be found at
156 https://github.com/OSGeo/PROJ/issues where new bug reports can be sub‐
157 mitted to.
158
160 https://proj.org/
161
163 Charles Karney
164
166 1983-2021
167
168
169
170
1718.2.0 Nov 1, 2021 GEOD(1)