This file is indexed.

/usr/share/doc/gmt/html/man/img2grd.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
<!-- Creator     : groff version 1.22.2 -->
<!-- CreationDate: Thu Feb 27 18:14:24 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>IMG2GRD</title>

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

<h1 align="center">IMG2GRD</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="#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">img2grd &minus;
Extract region of img in Mercator or geographic form</p>

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


<p style="margin-left:11%; margin-top: 1em"><b>img2grd</b>
<i>imgfile</i> <b>&minus;G</b><i>grdfile</i>
<b>&minus;R</b><i>west</i>/<i>east</i>/<i>south</i>/<i>north</i>[<b>r</b>]
<b>&minus;T</b><i>type</i> [ <b>&minus;C</b> ] [
<b>&minus;D</b>[<i>minlat/maxlat</i>] ] [ <b>&minus;E</b> ]
[ <b>&minus;L</b> ] [ <b>&minus;M</b> ] [
<b>&minus;N</b><i>navg</i> ] [ <b>&minus;S</b><i>scale</i> ]
[ <b>&minus;V</b> ] [ <b>&minus;W</b><i>maxlon</i> ] [
<b>&minus;m</b><i>minutes</i> ]</p>

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


<p style="margin-left:11%; margin-top: 1em"><b>img2grd</b>
is a front-end to <b><A HREF="img2mercgrd.html">img2mercgrd</A></b> which reads an img
format file and creates a grid file. The <b>&minus;M</b>
option dictates whether or not the Spherical Mercator
projection of the img file is preserved. <i><br>
imgfile</i></p>

<p style="margin-left:22%;">An img format file such as the
marine gravity or seafloor topography fields estimated from
satellite altimeter data by Sandwell and Smith. If the user
has set an environment variable <b>$GMT_DATADIR</b>, then
<b><A HREF="img2mercgrd.html">img2mercgrd</A></b> will try to find <i>imgfile</i> in
<b>$GMT_DATADIR</b>; else it will try to open <i>imgfile</i>
directly.</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;G</b></p></td>
<td width="8%"></td>
<td width="78%">


<p><i>grdfile</i> is the name of the output grid file.</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="3%">


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


<p><i>west, east, south,</i> and <i>north</i> specify the
Region of interest, and you may specify them in decimal
degrees or in [+-]dd:mm[:ss.xxx][W|E|S|N] format. Append
<b>r</b> if lower left and upper right map coordinates are
given instead of w/e/s/n. The two shorthands
<b>&minus;Rg</b> and <b>&minus;Rd</b> stand for global
domain (0/360 and -180/+180 in longitude respectively, with
-90/+90 in latitude). Alternatively, specify the name of an
existing grid file and the <b>&minus;R</b> settings (and
grid spacing, if applicable) are copied from the grid.</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="3%">


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


<p><i>type</i> handles the encoding of constraint
information. <i>type</i> = 0 indicates that no such
information is encoded in the img file (used for pre-1995
versions of the gravity data) and gets all data. <i>type</i>
&gt; 0 indicates that constraint information is encoded
(1995 and later (current) versions of the img files) so that
one may produce a grid file as follows:
<b>&minus;T</b><i>1</i> gets data values at all points,
<b>&minus;T</b><i>2</i> gets data values at constrained
points and NaN at interpolated points;
<b>&minus;T</b><i>3</i> gets 1 at constrained points and 0
at interpolated points.</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="3%">


<p style="margin-top: 1em"><b>&minus;C</b></p></td>
<td width="8%"></td>
<td width="78%">


<p style="margin-top: 1em">Set the x and y Mercator
coordinates relative to projection center [Default is
relative to lower left corner of grid]. Requires
<b>&minus;M</b>.</p> </td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="3%">


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


<p>Use the extended latitude range -80.738/+80.738.
Alternatively, append <i>minlat/maxlat</i> as the latitude
extent of the input img file. [Default is
-72.006/72.006].</p> </td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="3%">


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


<p>Can be used when <b>&minus;M</b> is not set to force the
final grid to have the exact same region as requested with
<b>&minus;R</b>. By default, the final region is a direct
projection of the original Mercator region and will
typically extend slightly beyond the requested latitude
range, and furthermore the grid increment in latitude does
not match the longitude increment. However, the extra
resampling introduces small interpolation errors and should
only be used if the output grid must match the requested
region and have x_inc = y_inc. In this case the region set
by <b>&minus;R</b> must be given in multiples of the
increment (.e.g, <b>&minus;R</b> 0/45/45/72).</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="3%">


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


<p>With no other arguments, list all *.img files found in
the directory pointed to by <b>$GMT_DATADIR</b>, or the
current directory if not defined. Ignored if other options
are present on the command line.</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="3%">


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


<p>Output a Spherical Mercator grid [Default is a
geographic lon/lat grid].</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="3%">


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


<p>Average the values in the input img pixels into
<i>navg</i> by <i>navg</i> squares, and create one output
pixel for each such square. If used with
<b>&minus;T</b><i>3</i> it will report an average constraint
between 0 and 1. If used with <b>&minus;T</b><i>2</i> the
output will be average data value or NaN according to
whether average constraint is &gt; 0.5. <i>navg</i> must
evenly divide into the dimensions of the imgfile in pixels.
[Default <i>1</i> does no averaging].</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="3%">


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


<p>Multiply the img file values by <i>scale</i> before
storing in grid file. [Default is 1.0]. For recent img
files: img topo files are stored in (corrected) meters
[<b>&minus;S</b> 1]; free-air gravity files in mGal*10
[<b>&minus;S</b> 0.1 to get mGal]; vertical deflection files
in microradians*10 [<b>&minus;S</b> 0.1 to get
microradians], vertical gravity gradient files in Eotvos*50
[<b>&minus;S</b> 0.02 to get Eotvos, or <b>&minus;S</b>
0.002 to get mGal/km]).</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="3%">


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


<p>Selects verbose mode, which will send progress reports
to stderr [Default runs &quot;silently&quot;]. Particularly
recommended here, as it is helpful to see how the
coordinates are adjusted.</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="3%">


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


<p>Indicate <i>minutes</i> as the width of an input img
pixel in minutes of longitude. [Default is 2.0].</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="3%">


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


<p>Indicate <i>maxlon</i> as the maximum longitude extent
of the input img file. Versions since 1995 have had
<i>maxlon</i> = 360.0, while some earlier files had
<i>maxlon</i> = 390.0. [Default is 360.0].</p></td></tr>
</table>

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


<p style="margin-left:11%; margin-top: 1em">To extract data
in the region <b>&minus;R</b>-40/40/-70/-30 from
<i>world_grav.img.7.2</i> and preserve the Mercator
gridding:</p>

<p style="margin-left:11%; margin-top: 1em"><b>img2grd</b>
world_grav.img.7.2 <b>&minus;G</b> merc_grav.grd
<b>&minus;R</b>-40/40/-70/-30 <b>&minus;M &minus;T</b> 1
<b>&minus;V</b></p>

<p style="margin-left:11%; margin-top: 1em">Without the
<b>&minus;M</b> option the same command will yield a
geographic grid.</p>

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


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