File: TransverseMercatorProj.1.html

package info (click to toggle)
geographiclib 1.49-4
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 11,656 kB
  • sloc: cpp: 32,394; cs: 9,567; sh: 4,757; ansic: 2,377; java: 2,208; python: 1,779; makefile: 861; xml: 390; pascal: 34
file content (162 lines) | stat: -rw-r--r-- 7,650 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
<?xml version="1.0" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>TransverseMercatorProj(1)</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rev="made" href="mailto:root@localhost" />
</head>

<body>



<h1 id="NAME">NAME</h1>

<p>TransverseMercatorProj -- perform transverse Mercator projection</p>

<h1 id="SYNOPSIS">SYNOPSIS</h1>

<p><b>TransverseMercatorProj</b> [ <b>-s</b> | <b>-t</b> ] [ <b>-l</b> <i>lon0</i> ] [ <b>-k</b> <i>k0</i> ] [ <b>-r</b> ] [ <b>-e</b> <i>a</i> <i>f</i> ] [ <b>-w</b> ] [ <b>-p</b> <i>prec</i> ] [ <b>--comment-delimiter</b> <i>commentdelim</i> ] [ <b>--version</b> | <b>-h</b> | <b>--help</b> ] [ <b>--input-file</b> <i>infile</i> | <b>--input-string</b> <i>instring</i> ] [ <b>--line-separator</b> <i>linesep</i> ] [ <b>--output-file</b> <i>outfile</i> ]</p>

<h1 id="DESCRIPTION">DESCRIPTION</h1>

<p>Perform the transverse Mercator projections. Convert geodetic coordinates to transverse Mercator coordinates. The central meridian is given by <i>lon0</i>. The longitude of origin is the equator. The scale on the central meridian is <i>k0</i>. By default an implementation of the exact transverse Mercator projection is used.</p>

<p>Geodetic coordinates are provided on standard input as a set of lines containing (blank separated) <i>latitude</i> and <i>longitude</i> (decimal degrees or degrees, minutes, seconds); for detils on the allowed formats for latitude and longitude, see the <code>GEOGRAPHIC COORDINATES</code> section of GeoConvert(1). For each set of geodetic coordinates, the corresponding projected easting, <i>x</i>, and northing, <i>y</i>, (meters) are printed on standard output together with the meridian convergence <i>gamma</i> (degrees) and scale <i>k</i>. The meridian convergence is the bearing of grid north (the <i>y</i> axis) measured clockwise from true north.</p>

<h1 id="OPTIONS">OPTIONS</h1>

<dl>

<dt id="s"><b>-s</b></dt>
<dd>

<p>use the sixth-order Krueger series approximation to the transverse Mercator projection instead of the exact projection.</p>

</dd>
<dt id="t"><b>-t</b></dt>
<dd>

<p>use the exact algorithm with the <a href="#EXTENDED-DOMAIN">&quot;EXTENDED DOMAIN&quot;</a>.</p>

</dd>
<dt id="l-lon0"><b>-l</b> <i>lon0</i></dt>
<dd>

<p>specify the longitude of origin <i>lon0</i> (degrees, default 0).</p>

</dd>
<dt id="k-k0"><b>-k</b> <i>k0</i></dt>
<dd>

<p>specify the scale <i>k0</i> on the central meridian (default 0.9996).</p>

</dd>
<dt id="r"><b>-r</b></dt>
<dd>

<p>perform the reverse projection. <i>x</i> and <i>y</i> are given on standard input and each line of standard output gives <i>latitude</i>, <i>longitude</i>, <i>gamma</i>, and <i>k</i>.</p>

</dd>
<dt id="e-a-f"><b>-e</b> <i>a</i> <i>f</i></dt>
<dd>

<p>specify the ellipsoid via the equatorial radius, <i>a</i> and the flattening, <i>f</i>. Setting <i>f</i> = 0 results in a sphere. Specify <i>f</i> &lt; 0 for a prolate ellipsoid. A simple fraction, e.g., 1/297, is allowed for <i>f</i>. By default, the WGS84 ellipsoid is used, <i>a</i> = 6378137 m, <i>f</i> = 1/298.257223563. If the exact algorithm is used, <i>f</i> must be positive.</p>

</dd>
<dt id="w"><b>-w</b></dt>
<dd>

<p>on input and output, longitude precedes latitude (except that on input this can be overridden by a hemisphere designator, <i>N</i>, <i>S</i>, <i>E</i>, <i>W</i>).</p>

</dd>
<dt id="p-prec"><b>-p</b> <i>prec</i></dt>
<dd>

<p>set the output precision to <i>prec</i> (default 6). <i>prec</i> is the number of digits after the decimal point for lengths (in meters). For latitudes and longitudes (in degrees), the number of digits after the decimal point is <i>prec</i> + 5. For the convergence (in degrees) and scale, the number of digits after the decimal point is <i>prec</i> + 6.</p>

</dd>
<dt id="comment-delimiter-commentdelim"><b>--comment-delimiter</b> <i>commentdelim</i></dt>
<dd>

<p>set the comment delimiter to <i>commentdelim</i> (e.g., &quot;#&quot; or &quot;//&quot;). If set, the input lines will be scanned for this delimiter and, if found, the delimiter and the rest of the line will be removed prior to processing and subsequently appended to the output line (separated by a space).</p>

</dd>
<dt id="version"><b>--version</b></dt>
<dd>

<p>print version and exit.</p>

</dd>
<dt id="h"><b>-h</b></dt>
<dd>

<p>print usage and exit.</p>

</dd>
<dt id="help"><b>--help</b></dt>
<dd>

<p>print full documentation and exit.</p>

</dd>
<dt id="input-file-infile"><b>--input-file</b> <i>infile</i></dt>
<dd>

<p>read input from the file <i>infile</i> instead of from standard input; a file name of &quot;-&quot; stands for standard input.</p>

</dd>
<dt id="input-string-instring"><b>--input-string</b> <i>instring</i></dt>
<dd>

<p>read input from the string <i>instring</i> instead of from standard input. All occurrences of the line separator character (default is a semicolon) in <i>instring</i> are converted to newlines before the reading begins.</p>

</dd>
<dt id="line-separator-linesep"><b>--line-separator</b> <i>linesep</i></dt>
<dd>

<p>set the line separator character to <i>linesep</i>. By default this is a semicolon.</p>

</dd>
<dt id="output-file-outfile"><b>--output-file</b> <i>outfile</i></dt>
<dd>

<p>write output to the file <i>outfile</i> instead of to standard output; a file name of &quot;-&quot; stands for standard output.</p>

</dd>
</dl>

<h1 id="EXTENDED-DOMAIN">EXTENDED DOMAIN</h1>

<p>The exact transverse Mercator projection has a <i>branch point</i> on the equator at longitudes (relative to <i>lon0</i>) of +/- (1 - <i>e</i>) 90, where <i>e</i> is the eccentricity of the ellipsoid. The standard convention for handling this branch point is to map positive (negative) latitudes into positive (negative) northings <i>y</i>; i.e., a branch cut is placed on the equator. With the <i>extended</i> domain, the northern sheet of the projection is extended into the south hemisphere by pushing the branch cut south from the branch points. See the reference below for details.</p>

<h1 id="EXAMPLES">EXAMPLES</h1>

<pre><code>   echo 0 90 | TransverseMercatorProj
   =&gt; 25953592.84 9997964.94 90 18.40
   echo 260e5 100e5 | TransverseMercatorProj -r
   =&gt; -0.02 90.00 90.01 18.48</code></pre>

<h1 id="ERRORS">ERRORS</h1>

<p>An illegal line of input will print an error message to standard output beginning with <code>ERROR:</code> and causes <b>TransverseMercatorProj</b> to return an exit code of 1. However, an error does not cause <b>TransverseMercatorProj</b> to terminate; following lines will be converted.</p>

<h1 id="AUTHOR">AUTHOR</h1>

<p><b>TransverseMercatorProj</b> was written by Charles Karney.</p>

<h1 id="SEE-ALSO">SEE ALSO</h1>

<p>The algorithms for the transverse Mercator projection are described in C. F. F. Karney, <i>Transverse Mercator with an accuracy of a few nanometers</i>, J. Geodesy <b>85</b>(8), 475-485 (Aug. 2011); DOI <a href="https://doi.org/10.1007/s00190-011-0445-3">https://doi.org/10.1007/s00190-011-0445-3</a>; preprint <a href="https://arxiv.org/abs/1002.1417">https://arxiv.org/abs/1002.1417</a>. The explanation of the extended domain of the projection with the <b>-t</b> option is given in Section 5 of this paper.</p>

<h1 id="HISTORY">HISTORY</h1>

<p><b>TransverseMercatorProj</b> was added to GeographicLib, <a href="https://geographiclib.sourceforge.io">https://geographiclib.sourceforge.io</a>, in 2009-01. Prior to version 1.9 it was called TransverseMercatorTest (and its interface was slightly different).</p>


</body>

</html>