This file is indexed.

/usr/share/doc/gmt/html/man/project.html is in gmt-doc 4.5.12-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
<!-- Creator     : groff version 1.22.2 -->
<!-- CreationDate: Thu Feb 27 18:13:11 2014 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<meta name="Content-Style" content="text/css">
<style type="text/css">
       p       { margin-top: 0; margin-bottom: 0; vertical-align: top }
       pre     { margin-top: 0; margin-bottom: 0; vertical-align: top }
       table   { margin-top: 0; margin-bottom: 0; vertical-align: top }
       h1      { text-align: center }
</style>
<title>PROJECT</title>

</head>
<body bgcolor="#ffffff">

<h1 align="center">PROJECT</h1>

<a href="#NAME">NAME</a><br>
<a href="#SYNOPSIS">SYNOPSIS</a><br>
<a href="#DESCRIPTION">DESCRIPTION</a><br>
<a href="#OPTIONS">OPTIONS</a><br>
<a href="#ASCII FORMAT PRECISION">ASCII FORMAT PRECISION</a><br>
<a href="#EXAMPLES">EXAMPLES</a><br>
<a href="#SEE ALSO">SEE ALSO</a><br>

<hr>


<h2>NAME
<a name="NAME"></a>
</h2>


<p style="margin-left:11%; margin-top: 1em">project &minus;
project data along a line or great circle, generate a
profile track, or translate coordinates.</p>

<h2>SYNOPSIS
<a name="SYNOPSIS"></a>
</h2>


<p style="margin-left:11%; margin-top: 1em"><b>project</b>
[ <i>infile</i> ] <b>&minus;C</b><i>cx</i>/<i>cy</i> [
<b>&minus;A</b><i>azimuth</i> ] [ <b>&minus;Dd</b>|<b>g</b>
] [ <b>&minus;E</b><i>bx</i>/<i>by</i> ] [
<b>&minus;F</b><i>flags</i> ] [ <b>&minus;G</b><i>dist</i> ]
[ <b>&minus;H</b>[<b>i</b>][<i>nrec</i>] ] [
<b>&minus;L</b>[<b>w</b>][<i>l_min</i>/<i>l_max</i>] ] [
<b>&minus;N</b> ] [ <b>&minus;Q</b> ] [ <b>&minus;S</b> ] [
<b>&minus;T</b><i>px</i>/<i>py</i> ] [ <b>&minus;V</b> ] [
<b>&minus;W</b><i>w_min</i>/<i>w_max</i> ] [
<b>&minus;:</b>[<b>i</b>|<b>o</b>] ] [
<b>&minus;b</b>[<b>i</b>|<b>o</b>][<b>s</b>|<b>S</b>|<b>d</b>|<b>D</b>[<i>ncol</i>]|<b>c</b>[<i>var1</i><b>/</b><i>...</i>]]
] [ <b>&minus;f</b>[<b>i</b>|<b>o</b>]<i>colinfo</i> ] [
<b>&minus;m</b>[<b>i</b>|<b>o</b>][<i>flag</i>] ]</p>

<h2>DESCRIPTION
<a name="DESCRIPTION"></a>
</h2>


<p style="margin-left:11%; margin-top: 1em"><b>project</b>
reads arbitrary (<i>x, y</i>[, <i>z</i>]) data from standard
input [or <i>infile</i> ] and writes to standard output any
combination of (<i>x, y, z, p, q, r, s</i>), where (<i>p,
q</i>) are the coordinates in the projection, (<i>r, s</i>)
is the position in the (<i>x, y</i>) coordinate system of
the point on the profile (<i>q</i> = 0 path) closest to
(<i>x, y</i>), and <i>z</i> is all remaining columns in the
input (beyond the required <i>x</i> and <i>y</i> columns).
Alternatively, <b>project</b> may be used to generate (<i>r,
s, p</i>) triples at equal increments <i>dist</i> along a
profile. In this case ( <b>&minus;G</b> option), no input is
read. Projections are defined in any (but only) one of three
ways: (Definition 1) By a Center <b>&minus;C</b> and an
Azimuth <b>&minus;A</b> in degrees clockwise from North.
(Definition 2) By a Center <b>&minus;C</b> and end point E
of the projection path <b>&minus;E</b>. (Definition 3) By a
Center <b>&minus;C</b> and a roTation pole position
<b>&minus;T</b>. To spherically project data along a great
circle path, an oblique coordinate system is created which
has its equator along that path, and the zero meridian
through the Center. Then the oblique longitude (<i>p</i>)
corresponds to the distance from the Center along the great
circle, and the oblique latitude (<i>q</i>) corresponds to
the distance perpendicular to the great circle path. When
moving in the increasing (<i>p</i>) direction, (toward
<i>B</i> or in the <i>azimuth</i> direction), the positive
(<i>q</i>) direction is to your left. If a Pole has been
specified, then the positive (<i>q</i>) direction is toward
the pole. <br>
To specify an oblique projection, use the <b>&minus;T</b>
option to set the Pole. Then the equator of the projection
is already determined and the <b>&minus;C</b> option is used
to locate the <i>p</i> = 0 meridian. The Center <i>cx/cy</i>
will be taken as a point through which the <i>p</i> = 0
meridian passes. If you do not care to choose a particular
point, use the South pole (<i>ox</i> = 0, <i>oy</i> = -90).
<br>
Data can be selectively windowed by using the
<b>&minus;L</b> and <b>&minus;W</b> options. If
<b>&minus;W</b> is used, the projection Width is set to use
only points with <i>w_min</i> &lt; q &lt; <i>w_max</i>. If
<b>&minus;L</b> is set, then the Length is set to use only
those points with <i>l_min</i> &lt; p &lt; <i>l_max</i>. If
the <b>&minus;E</b> option has been used to define the
projection, then <b>&minus;Lw</b> may be selected to window
the length of the projection to exactly the span from
<b>O</b> to <b>B</b>. <br>
Flat Earth (Cartesian) coordinate transformations can also
be made. Set <b>&minus;N</b> and remember that
<i>azimuth</i> is clockwise from North (the <i>y</i> axis),
NOT the usual cartesian theta, which is counterclockwise
from the <i>x</i> axis. <i>azimuth</i> = 90 - theta. <br>
No assumptions are made regarding the units for <i>x, y, r,
s, p, q, dist, l_min, l_max, w_min, w_max</i>. If
<b>&minus;Q</b> is selected, map units are assumed and <i>x,
y, r, s</i> must be in degrees and <i>p, q, dist, l_min,
l_max, w_min, w_max</i> will be in km. <br>
Calculations of specific great-circle and geodesic distances
or for back-azimuths or azimuths are better done using
<b>mapproject</b>. <b><br>
project</b> is CASE SENSITIVE. Use UPPER CASE for all
one-letter designators which begin optional arguments. Use
lower case for the xyzpqrs letters in
<b>&minus;flags</b>.</p>

<table width="100%" border="0" rules="none" frame="void"
       cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="11%"></td>
<td width="3%">


<p><b>&minus;C</b></p></td>
<td width="8%"></td>
<td width="78%">


<p><i>cx/cy</i> sets the origin of the projection, in
Definition 1 or 2. If Definition 3 is used
(<b>&minus;T</b>), then <i>cx/cy</i> are the coordinates of
a point through which the oblique zero meridian (<i>p</i> =
0) should pass.</p></td></tr>
</table>

<h2>OPTIONS
<a name="OPTIONS"></a>
</h2>


<table width="100%" border="0" rules="none" frame="void"
       cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="11%"></td>
<td width="9%">


<p style="margin-top: 1em"><i>infile</i></p></td>
<td width="2%"></td>
<td width="78%">


<p style="margin-top: 1em">name of ASCII (or binary, see
<b>&minus;bi</b>) file(s) with 2 or more columns holding
(x,y,[z]) data values. If no filenames are given,
<b>project</b> will read from standard input. If the
<b>&minus;G</b> option is selected, no input data are
read.</p> </td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="9%">


<p><b>&minus;F</b></p></td>
<td width="2%"></td>
<td width="78%">


<p>Specify your desired output using any combination of
<i>xyzpqrs</i>, in any order. Do not space between the
letters. Use lower case. The output will be ASCII (or
binary, see <b>&minus;bo</b>) columns of values
corresponding to <i>xyzpqrs</i> [Default]. If both input and
output are using ASCII format then the <i>z</i> data are
treated as textstring(s). If the <b>&minus;G</b> option is
selected, the output will be <i>rsp</i>.</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="9%">


<p><b>&minus;A</b></p></td>
<td width="2%"></td>
<td width="78%">


<p><i>azimuth</i> defines the azimuth of the projection
(Definition 1).</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="9%">


<p><b>&minus;D</b></p></td>
<td width="2%"></td>
<td width="78%">


<p>Set the location of the Discontinuity in longitude
(<i>r</i> coordinate). <b>&minus;Dd</b> will place the
discontinuity at the Dateline, (-180 &lt; <i>r</i> &lt;
180); <b>&minus;Dg</b> will place it at Greenwich, (0 &lt;
<i>r</i> &lt; 360). Default usually falls at dateline due to
<i>atan2</i> calls.</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="9%">


<p><b>&minus;E</b></p></td>
<td width="2%"></td>
<td width="78%">


<p><i>bx/by</i> defines the end point of the projection
path (Definition 2).</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="9%">


<p><b>&minus;G</b></p></td>
<td width="2%"></td>
<td width="78%">


<p><i>dist</i> Generate mode. No input is read. Create
(<i>r, s, p</i>) output points every <i>dist</i> units of
<i>p</i>. See <b>&minus;Q</b> option.</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="9%">


<p><b>&minus;H</b></p></td>
<td width="2%"></td>
<td width="78%">


<p>Input file(s) has header record(s). If used, the default
number of header records is <b><A HREF="gmtdefaults.html#N_HEADER_RECS">N_HEADER_RECS</A></b>. Use
<b>&minus;Hi</b> if only input data should have header
records [Default will write out header records if the input
data have them]. Blank lines and lines starting with # are
always skipped.</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="9%">


<p><b>&minus;L</b></p></td>
<td width="2%"></td>
<td width="78%">


<p>Length controls. Project only those points whose
<i>p</i> coordinate is within <i>l_min</i> &lt; <i>p</i>
&lt; <i>l_max</i>. If <b>&minus;E</b> has been set, then you
may use <b>&minus;Lw</b> to stay within the distance from
<b>C</b> to <b>E</b>.</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="9%">


<p><b>&minus;N</b></p></td>
<td width="2%"></td>
<td width="78%">


<p>Flat Earth. Make a Cartesian coordinate transformation
in the plane. [Default uses spherical trigonometry.]</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="9%">


<p><b>&minus;Q</b></p></td>
<td width="2%"></td>
<td width="78%">


<p>Map type units, i.e., project assumes <i>x, y, r, s</i>
are in degrees while <i>p, q, dist, l_min, l_max, w_min,
w_max</i> are in km. If <b>&minus;Q</b> is not set, then all
these are assumed to be in the same units.</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="9%">


<p><b>&minus;S</b></p></td>
<td width="2%"></td>
<td width="78%">


<p>Sort the output into increasing <i>p</i> order. Useful
when projecting random data into a sequential profile.</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="9%">


<p><b>&minus;T</b></p></td>
<td width="2%"></td>
<td width="78%">


<p><i>px/py</i> sets the position of the roTation pole of
the projection. (Definition 3).</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="9%">


<p><b>&minus;V</b></p></td>
<td width="2%"></td>
<td width="78%">


<p>Selects verbose mode, which will send progress reports
to stderr [Default runs &quot;silently&quot;].</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="9%">


<p><b>&minus;W</b></p></td>
<td width="2%"></td>
<td width="78%">


<p>Width controls. Project only those points whose <i>q</i>
coordinate is within <i>w_min</i> &lt; <i>q</i> &lt;
<i>w_max</i>.</p> </td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="9%">


<p><b>&minus;:</b></p></td>
<td width="2%"></td>
<td width="78%">


<p>Toggles between (longitude,latitude) and
(latitude,longitude) input and/or output. [Default is
(longitude,latitude)]. Append <b>i</b> to select input only
or <b>o</b> to select output only. [Default affects
both].</p> </td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="9%">


<p><b>&minus;bi</b></p></td>
<td width="2%"></td>
<td width="78%">


<p>Selects binary input. Append <b>s</b> for single
precision [Default is <b>d</b> (double)]. Uppercase <b>S</b>
or <b>D</b> will force byte-swapping. Optionally, append
<i>ncol</i>, the number of columns in your binary input file
if it exceeds the columns needed by the program. Or append
<b>c</b> if the input file is netCDF. Optionally, append
<i>var1</i><b>/</b><i>var2</i><b>/</b><i>...</i> to specify
the variables to be read. [Default is 2 input columns].</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="9%">


<p><b>&minus;bo</b></p></td>
<td width="2%"></td>
<td width="78%">


<p>Selects binary output. Append <b>s</b> for single
precision [Default is <b>d</b> (double)]. Uppercase <b>S</b>
or <b>D</b> will force byte-swapping. Optionally, append
<i>ncol</i>, the number of desired columns in your binary
output file. [Default is given by <b>&minus;F</b> or
<b>&minus;G</b>].</p> </td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="9%">


<p><b>&minus;f</b></p></td>
<td width="2%"></td>
<td width="78%">


<p>Special formatting of input and/or output columns (time
or geographical data). Specify <b>i</b> or <b>o</b> to make
this apply only to input or output [Default applies to
both]. Give one or more columns (or column ranges) separated
by commas. Append <b>T</b> (absolute calendar time),
<b>t</b> (relative time in chosen <b><A HREF="gmtdefaults.html#TIME_UNIT">TIME_UNIT</A></b> since
<b><A HREF="gmtdefaults.html#TIME_EPOCH">TIME_EPOCH</A></b>), <b>x</b> (longitude), <b>y</b>
(latitude), or <b>f</b> (floating point) to each column or
column range item. Shorthand
<b>&minus;f</b>[<b>i</b>|<b>o</b>]<b>g</b> means
<b>&minus;f</b>[<b>i</b>|<b>o</b>]0<b>x</b>,1<b>y</b>
(geographic coordinates).</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="9%">


<p><b>&minus;m</b></p></td>
<td width="2%"></td>
<td width="78%">


<p>Multiple segment file(s). Segments are separated by a
special record. For ASCII files the first character must be
<i>flag</i> [Default is &rsquo;&gt;&rsquo;]. For binary
files all fields must be NaN and <b>&minus;b</b> must set
the number of output columns explicitly. By default the
<b>&minus;m</b> setting applies to both input and output.
Use <b>&minus;mi</b> and <b>&minus;mo</b> to give separate
settings to input and output.</p></td></tr>
</table>

<h2>ASCII FORMAT PRECISION
<a name="ASCII FORMAT PRECISION"></a>
</h2>


<p style="margin-left:11%; margin-top: 1em">The ASCII
output formats of numerical data are controlled by
parameters in your .gmtdefaults4 file. Longitude and
latitude are formatted according to
<b><A HREF="gmtdefaults.html#OUTPUT_DEGREE_FORMAT">OUTPUT_DEGREE_FORMAT</A></b>, whereas other values are
formatted according to <b><A HREF="gmtdefaults.html#D_FORMAT">D_FORMAT</A></b>. Be aware that the
format in effect can lead to loss of precision in the
output, which can lead to various problems downstream. If
you find the output is not written with enough precision,
consider switching to binary output (<b>&minus;bo</b> if
available) or specify more decimals using the
<b><A HREF="gmtdefaults.html#D_FORMAT">D_FORMAT</A></b> setting.</p>

<h2>EXAMPLES
<a name="EXAMPLES"></a>
</h2>


<p style="margin-left:11%; margin-top: 1em">To generate
points every 10km along a great circle from 10N,50W to
30N,10W:</p>

<p style="margin-left:11%; margin-top: 1em"><b>project
&minus;C</b>-50/10 <b>&minus;E</b>-10/30 <b>&minus;G</b> 10
<b>&minus;Q</b> &gt; great_circle_points.xyp</p>

<p style="margin-left:11%; margin-top: 1em">(Note that
great_circle_points.xyp could now be used as input for
<b><A HREF="grdtrack.html">grdtrack</A></b>, etc. ).</p>

<p style="margin-left:11%; margin-top: 1em">To project the
shiptrack gravity, magnetics, and bathymetry in c2610.xygmb
along a great circle through an origin at 30S, 30W, the
great circle having an azimuth of N20W at the origin,
keeping only the data from NE of the profile and within +/-
500 km of the origin, run:</p>

<p style="margin-left:11%; margin-top: 1em"><b>project</b>
c2610.xygmb <b>&minus;C</b>-30/-30 <b>&minus;A</b>-20
<b>&minus;W</b>-10000/0 <b>&minus;L</b>-500/500
<b>&minus;F</b> pz <b>&minus;Q</b> &gt;
c2610_projected.pgmb</p>

<p style="margin-left:11%; margin-top: 1em">(Note in this
example that <b>&minus;W</b>-10000/0 is used to admit any
value with a large negative <i>q</i> coordinate. This will
take those points which are on our right as we walk along
the great circle path, or to the NE in this example.)</p>

<p style="margin-left:11%; margin-top: 1em">To make a
Cartesian coordinate transformation of mydata.xy so that the
new origin is at 5,3 and the new <i>x</i> axis (<i>p</i>)
makes an angle of 20 degrees with the old <i>x</i> axis,
use:</p>

<p style="margin-left:11%; margin-top: 1em"><b>project</b>
mydata.xy <b>&minus;C</b> 5/3 <b>&minus;A</b> 70
<b>&minus;F</b> pq &gt; mydata.pq</p>

<p style="margin-left:11%; margin-top: 1em">To take data in
the file pacific.lonlat and transform it into oblique
coordinates using a pole from the hotspot reference frame
and placing the oblique zero meridian (<i>p</i> = 0 line)
through Tahiti, run:</p>

<p style="margin-left:11%; margin-top: 1em"><b>project</b>
pacific.lonlat <b>&minus;T</b>-75/68
<b>&minus;C</b>-149:26/-17:37 <b>&minus;F</b> pq &gt;
pacific.pq</p>

<p style="margin-left:11%; margin-top: 1em">Suppose that
pacific_topo.grd is a grid file of bathymetry, and you want
to make a file of flowlines in the hotspot reference frame.
If you run:</p>

<p style="margin-left:11%; margin-top: 1em"><b><A HREF="grd2xyz.html">grd2xyz</A></b>
pacific_topo.grd | <b>project &minus;T</b>-75/68
<b>&minus;C</b> 0/-90 <b>&minus;F</b> xyq | <b>xyz2grd
&minus;R</b><i>etc</i> <b>&minus;I</b><i>etc</i>
<b>&minus;C</b> flow.grd</p>

<p style="margin-left:11%; margin-top: 1em">then flow.grd
is a file in the same area as pacific_topo.grd, but flow
contains the latitudes about the pole of the projection. You
now can use grdcontour on flow.grd to draw lines of constant
oblique latitude, which are flow lines in the hotspot
frame.</p>

<p style="margin-left:11%; margin-top: 1em">If you have an
arbitrarily rotation pole <i>px/py</i> and you would like to
draw an oblique small circle on a map, you will first need
to make a file with the oblique coordinates for the small
circle (i.e., lon = 0&minus;360, lat is constant), then
create a file with two records: the north pole (0/90) and
the origin (0/0), and find what their oblique coordinates
are using your rotation pole. Now, use the projected North
pole and origin coordinates as the rotation pole and center,
respectively, and project your file as in the pacific
example above. This gives coordinates for an oblique small
circle.</p>

<h2>SEE ALSO
<a name="SEE ALSO"></a>
</h2>



<p style="margin-left:11%; margin-top: 1em"><i><A HREF="fitcircle.html">fitcircle</A></i>(1),
<i><A HREF="GMT.html">GMT</A></i>(1), <i>mapproject</i>(1),
<i>grdproject</i>(1)</p>
<hr>
</body>
</html>