1GEOD(1)                              PROJ                              GEOD(1)
2
3
4

NAME

6       geod - Geodesic computations
7

SYNOPSIS

9          geod +ellps=<ellipse> [-afFIlptwW [args]] [+opt[=arg] ...] file ...
10
11          invgeod  +ellps=<ellipse>  [-afFIlptwW [args]] [+opt[=arg] ...] file
12          ...
13

DESCRIPTION

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.
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 for geographic coordinates and "%.3f" for distance.
48
49       -F <format>
50              Where  format  is  a  printf format string to control the output
51              form of the distance value (-F). The default mode is DMS for ge‐
52              ographic coordinates and "%.3f" for distance.
53
54       -w<n>  Where n is the number of significant fractional digits to employ
55              for seconds output (when the option is not specified, -w3 is as‐
56              sumed).
57
58       -W<n>  Where n is the number of significant fractional digits to employ
59              for seconds output. When -W is employed the fields will be  con‐
60              stant width with leading zeroes.
61
62       -p     This option causes the azimuthal values to be output as unsigned
63              DMS numbers between 0 and 360 degrees. Also note -f.
64
65       The +opt command-line options are associated with  geodetic  parameters
66       for specifying the ellipsoidal or sphere to use.  controls. The options
67       are processed in left to right order from the command line. Reentry  of
68       an  option  is  ignored with the first occurrence assumed to be the de‐
69       sired value.
70
71       See the PROJ documentation for a full list of these parameters and con‐
72       trols.
73
74       One or more files (processed in left to right order) specify the source
75       of data to be transformed. A - will specify the location of  processing
76       standard  input.  If no files are specified, the input is assumed to be
77       from stdin.
78
79       For direct determinations input data must be  in  latitude,  longitude,
80       azimuth  and  distance order and output will be latitude, longitude and
81       back azimuth of the terminus point. Latitude, longitude of the  initial
82       and  terminus  point are input for the inverse mode and respective for‐
83       ward and back azimuth from the initial and terminus points  are  output
84       along with the distance between the points.
85
86       Input  geographic  coordinates  (latitude  and longitude) and azimuthal
87       data must be in decimal degrees or DMS format and input  distance  data
88       must be in units consistent with the ellipsoid major axis or sphere ra‐
89       dius units. The latitude must lie in the range [-90d,90d]. Output  geo‐
90       graphic  coordinates  will be in DMS (if the -f switch is not employed)
91       to 0.001" with trailing, zero-valued minute-second fields deleted. Out‐
92       put  distance data will be in the same units as the ellipsoid or sphere
93       radius.
94
95       The Earth's ellipsoidal figure may be selected in the  same  manner  as
96       program proj by using +ellps=, +a=, +es=, etc.
97
98       geod  may  also be used to determine intermediate points along either a
99       geodesic line between two points or along an arc of specified  distance
100       from  a geographic point. In both cases an initial point must be speci‐
101       fied with +lat_1=lat and +lon_1=lon parameters and  either  a  terminus
102       point +lat_2=lat and +lon_2=lon or a distance and azimuth from the ini‐
103       tial point with +S=distance and +A=azimuth must be specified.
104
105       If points along a geodesic are to be determined then either  +n_S=inte‐
106       ger specifying the number of intermediate points and/or +del_S=distance
107       specifying the incremental distance between points must be specified.
108
109       To determine points along an arc equidistant  from  the  initial  point
110       both  +del_A=angle  and  +n_A=integer must be specified which determine
111       the respective angular increments and number of  points  to  be  deter‐
112       mined.
113

EXAMPLES

115       The  following  script determines the geodesic azimuths and distance in
116       U.S.  statute miles from Boston, MA, to Portland, OR:
117
118          geod +ellps=clrk66 <<EOF -I +units=us-mi
119          42d15'N 71d07'W 45d31'N 123d41'W
120          EOF
121
122       which gives the results:
123
124          -66d31'50.141" 75d39'13.083" 2587.504
125
126       where the first two values are the azimuth from Boston to Portland, the
127       back azimuth from Portland to Boston followed by the distance.
128
129       An  example  of  forward geodesic use is to use the Boston location and
130       determine Portland's location by azimuth and distance:
131
132          geod +ellps=clrk66 <<EOF +units=us-mi
133          42d15'N 71d07'W -66d31'50.141" 2587.504
134          EOF
135
136       which gives:
137
138          45d31'0.003"N 123d40'59.985"W 75d39'13.094"
139
140       NOTE:
141          Lack of precision in the distance value compromises the precision of
142          the Portland location.
143

FURTHER READING

145       1. GeographicLib.
146
147       2. C.  F.  F. Karney, Algorithms for Geodesics, J. Geodesy 87(1), 43–55
148          (2013); addenda.
149
150       3. A geodesic bibliography.
151

SEE ALSO

153       proj(1), cs2cs(1), cct(1), gie(1), projinfo(1), projsync(1)
154

BUGS

156       A     list     of     know     bugs      can      be      found      at
157       https://github.com/OSGeo/PROJ/issues  where new bug reports can be sub‐
158       mitted to.
159

HOME PAGE

161       https://proj.org/
162

AUTHOR

164       Charles Karney
165
167       1983-2020
168
169
170
171
1727.2.1                            Dec 25, 2020                          GEOD(1)
Impressum