/usr/share/doc/gmt/html/man/grdraster.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 | <!-- Creator : groff version 1.22.2 -->
<!-- CreationDate: Thu Feb 27 18:14:17 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>GRDRASTER</title>
</head>
<body bgcolor="#ffffff">
<h1 align="center">GRDRASTER</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>
<a href="#REFERENCES">REFERENCES</a><br>
<hr>
<h2>NAME
<a name="NAME"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em">grdraster
− extract subregion from a binary raster and write a
grid file</p>
<h2>SYNOPSIS
<a name="SYNOPSIS"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em"><b>grdraster</b>
[ <i>filenumber</i> | <i>"text pattern"</i> ]
<b>−R</b><i>west</i>/<i>east</i>/<i>south</i>/<i>north</i>[<b>r</b>]
[ <b>−G</b><i>grdfile</i> ] [
<b>−I</b><i>xinc</i>[<b>m</b>|<b>c</b>][/<i>yinc</i>[<b>m</b>|<b>c</b>]]
] [ <b>−J</b><i>parameters</i> ] [ <b>−V</b> ] [
<b>−bo</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>]]
]</p>
<h2>DESCRIPTION
<a name="DESCRIPTION"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em"><b>grdraster</b>
reads a file called <i>grdraster.info</i> from the current
working directory, the directories pointed to by the
environment variables <b>$GMT_DATADIR</b> and
<b>$GMT_USERDIR</b>, or in <b>$GMT_SHAREDIR</b>/dbase (in
that order). The file <i>grdraster.info</i> defines binary
arrays of data stored in scan-line format in data files.
Each file is given a <i>filenumber</i> in the info file.
<b>grdraster</b> figures out how to load the raster data
into a grid file spanning a region defined by
<b>−R</b>. By default the grid spacing equals the
raster spacing. The <b>−I</b> option may be used to
sub-sample the raster data. No filtering or interpolating is
done, however; the <i>x_inc</i> and <i>y_inc</i> of the grid
must be multiples of the increments of the raster file and
<b>grdraster</b> simply takes every n’th point. The
output of <b>grdraster</b> is either grid or pixel
registered depending on the registration of the raster used.
It is up to the <b><A HREF="GMT.html">GMT</A></b> system person to maintain the
<i>grdraster.info</i> file in accordance with the available
rasters at each site. Raster data sets are not supplied with
<b><A HREF="GMT.html">GMT</A></b> but can be obtained by anonymous ftp and on
CD-ROM (see README page in dbase directory).
<b>grdraster</b> will list the available files if no
arguments are given. Finally, <b>grdraster</b> will write
xyz-triplets to stdout if no output gridfile name is given
<i><br>
filenumber</i></p>
<p style="margin-left:22%;">If an integer matching one of
the files listed in the <i>grdraster.info</i> file is given
we will use that data set, else we will match the given text
pattern with the data set description in order to determine
the data set.</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>−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>−Rg</b> and <b>−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>−R</b> settings (and
grid spacing, if applicable) are copied from the grid. If
<b>r</b> is appended, you may also specify a map projection
to define the shape of your region. The output region will
be rounded off to the nearest whole grid-step in both
dimensions.</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>−G</b></p></td>
<td width="8%"></td>
<td width="78%">
<p style="margin-top: 1em">Name of output grid file. If not
set, the grid will be written as ASCII (or binary; see
<b>−bo</b> xyz-triplets to stdout instead.</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="3%">
<p><b>−I</b></p></td>
<td width="8%"></td>
<td width="78%">
<p><i>x_inc</i> [and optionally <i>y_inc</i>] is the grid
spacing. Optionally, append a suffix modifier.
<b>Geographical (degrees) coordinates</b>: Append <b>m</b>
to indicate arc minutes or <b>c</b> to indicate arc seconds.
If one of the units <b>e</b>, <b>k</b>, <b>i</b>, or
<b>n</b> is appended instead, the increment is assumed to be
given in meter, km, miles, or nautical miles, respectively,
and will be converted to the equivalent degrees longitude at
the middle latitude of the region (the conversion depends on
<b><A HREF="gmtdefaults.html#ELLIPSOID">ELLIPSOID</A></b>). If /<i>y_inc</i> is given but set to 0 it
will be reset equal to <i>x_inc</i>; otherwise it will be
converted to degrees latitude. <b>All coordinates</b>: If
<b>=</b> is appended then the corresponding max <i>x</i>
(<i>east</i>) or <i>y</i> (<i>north</i>) may be slightly
adjusted to fit exactly the given increment [by default the
increment may be adjusted slightly to fit the given domain].
Finally, instead of giving an increment you may specify the
<i>number of nodes</i> desired by appending <b>+</b> to the
supplied integer argument; the increment is then
recalculated from the number of nodes and the domain. The
resulting increment value depends on whether you have
selected a gridline-registered or pixel-registered grid; see
Appendix B for details. Note: if
<b>−R</b><i>grdfile</i> is used then grid spacing has
already been initialized; use <b>−I</b> to override
the values.</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="3%">
<p><b>−J</b></p></td>
<td width="8%"></td>
<td width="78%">
<p>Selects the map projection. Scale is UNIT/degree,
1:xxxxx, or width in UNIT (upper case modifier). UNIT is cm,
inch, or m, depending on the <b><A HREF="gmtdefaults.html#MEASURE_UNIT">MEASURE_UNIT</A></b> setting in
.gmtdefaults4, but this can be overridden on the command
line by appending <b>c</b>, <b>i</b>, or <b>m</b> to the
scale/width value. When central meridian is optional,
default is center of longitude range on <b>−R</b>
option. Default standard parallel is the equator. For map
height, max dimension, or min dimension, append <b>h</b>,
<b>+</b>, or <b>-</b> to the width, respectively.</p></td></tr>
</table>
<p style="margin-left:22%;">More details can be found in
the <b><A HREF="psbasemap.html">psbasemap</A></b> man pages.</p>
<p style="margin-left:22%; margin-top: 1em"><b>CYLINDRICAL
PROJECTIONS:</b></p>
<p style="margin-left:22%; margin-top: 1em"><b>−Jc</b><i>lon0/lat0/scale</i>
(Cassini) <b><br>
−Jcyl_stere</b>/[<i>lon0/</i>[<i>lat0/</i>]]<i>scale</i>
(Cylindrical Stereographic) <b><br>
−Jj</b>[<i>lon0/</i>]<i>scale</i> (Miller) <b><br>
−Jm</b>[<i>lon0</i>/[<i>lat0/</i>]]<i>scale</i>
(Mercator) <b><br>
−Jm</b><i>lon0/lat0/scale</i> (Mercator - Give
meridian and standard parallel) <b><br>
−Jo</b>[<b>a</b>]<i>lon0/lat0/azimuth/scale</i>
(Oblique Mercator - point and azimuth) <b><br>
−Jo</b>[<b>b</b>]<i>lon0/lat0/lon1/lat1/scale</i>
(Oblique Mercator - two points) <b><br>
−Joc</b><i>lon0/lat0/lonp/latp/scale</i> (Oblique
Mercator - point and pole) <b><br>
−Jq</b>[<i>lon0/</i>[<i>lat0/</i>]]<i>scale</i>
(Cylindrical Equidistant) <b><br>
−Jt</b><i>lon0/</i>[<i>lat0/</i>]<i>scale</i> (TM -
Transverse Mercator) <b><br>
−Ju</b><i>zone/scale</i> (UTM - Universal Transverse
Mercator) <b><br>
−Jy</b>[<i>lon0/</i>[<i>lat0/</i>]]<i>scale</i>
(Cylindrical Equal-Area)</p>
<p style="margin-left:22%; margin-top: 1em"><b>CONIC
PROJECTIONS:</b></p>
<p style="margin-left:22%; margin-top: 1em"><b>−Jb</b><i>lon0/lat0/lat1/lat2/scale</i>
(Albers) <b><br>
−Jd</b><i>lon0/lat0/lat1/lat2/scale</i> (Conic
Equidistant) <b><br>
−Jl</b><i>lon0/lat0/lat1/lat2/scale</i> (Lambert Conic
Conformal) <b><br>
−Jpoly</b>/[<i>lon0/</i>[<i>lat0/</i>]]<i>scale</i>
((American) Polyconic)</p>
<p style="margin-left:22%; margin-top: 1em"><b>AZIMUTHAL
PROJECTIONS:</b></p>
<p style="margin-left:22%; margin-top: 1em"><b>−Ja</b><i>lon0/lat0</i>[<i>/horizon</i>]<i>/scale</i>
(Lambert Azimuthal Equal-Area) <b><br>
−Je</b><i>lon0/lat0</i>[<i>/horizon</i>]<i>/scale</i>
(Azimuthal Equidistant) <b><br>
−Jf</b><i>lon0/lat0</i>[<i>/horizon</i>]<i>/scale</i>
(Gnomonic) <b><br>
−Jg</b><i>lon0/lat0</i>[<i>/horizon</i>]<i>/scale</i>
(Orthographic) <b><br>
−Jg</b><i>lon0/lat0/altitude/azimuth/tilt/twist/Width/Height/scale</i>
(General Perspective). <b><br>
−Js</b><i>lon0/lat0</i>[<i>/horizon</i>]<i>/scale</i>
(General Stereographic)</p>
<p style="margin-left:22%; margin-top: 1em"><b>MISCELLANEOUS
PROJECTIONS:</b></p>
<p style="margin-left:22%; margin-top: 1em"><b>−Jh</b>[<i>lon0/</i>]<i>scale</i>
(Hammer) <b><br>
−Ji</b>[<i>lon0/</i>]<i>scale</i> (Sinusoidal) <b><br>
−Jkf</b>[<i>lon0/</i>]<i>scale</i> (Eckert IV) <b><br>
−Jk</b>[<b>s</b>][<i>lon0/</i>]<i>scale</i> (Eckert
VI) <b><br>
−Jn</b>[<i>lon0/</i>]<i>scale</i> (Robinson) <b><br>
−Jr</b>[<i>lon0/</i>]<i>scale</i> (Winkel Tripel)
<b><br>
−Jv</b>[<i>lon0/</i>]<i>scale</i> (Van der Grinten)
<b><br>
−Jw</b>[<i>lon0/</i>]<i>scale</i> (Mollweide)</p>
<p style="margin-left:22%; margin-top: 1em"><b>NON-GEOGRAPHICAL
PROJECTIONS:</b></p>
<p style="margin-left:22%; margin-top: 1em"><b>−Jp</b>[<b>a</b>]<i>scale</i>[<i>/origin</i>][<b>r</b>|<b>z</b>]
(Polar coordinates (theta,r)) <b><br>
−Jx</b><i>x-scale</i>[<b>d</b>|<b>l</b>|<b>p</b><i>pow</i>|<b>t</b>|<b>T</b>][<i>/y-scale</i>[<b>d</b>|<b>l</b>|<b>p</b><i>pow</i>|<b>t</b>|<b>T</b>]]
(Linear, log, and power scaling)</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="4%">
<p style="margin-top: 1em"><b>−V</b></p></td>
<td width="7%"></td>
<td width="78%">
<p style="margin-top: 1em">Selects verbose mode, which will
send progress reports to stderr [Default runs
"silently"].</p> </td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">
<p><b>−bo</b></p></td>
<td width="7%"></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. This option applies only if no <b>−G</b>
option has been set.</p></td></tr>
</table>
<h2>EXAMPLES
<a name="EXAMPLES"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em">To extract data
from raster 1, taking one point every 30 minutes, in an area
extended beyond 360 degrees to allow later filtering,
run</p>
<p style="margin-left:11%; margin-top: 1em"><b>grdraster</b>
1 <b>−R</b>-4/364/-62/62 <b>−I</b> 30<b>m
−G</b> data.grd</p>
<p style="margin-left:11%; margin-top: 1em">To obtain data
for an oblique Mercator projection we need to extract more
data that is actually used. This is necessary because the
output of <b>grdraster</b> has edges defined by parallels
and meridians, while the oblique map in general does not.
Hence, to get all the data from the ETOPO2 data needed to
make a contour map for the region defined by its lower left
and upper right corners and the desired projection, use</p>
<p style="margin-left:11%; margin-top: 1em"><b>grdraster</b>
ETOPO2 <b>−R</b> 160/20/220/30<b>r −Joc</b>
190/25.5/292/69/1 <b>−G</b> data.grd</p>
<p style="margin-left:11%; margin-top: 1em">To extract data
from the 2 min Geoware relief blend and write it as binary
double precision xyz-triplets to standard output:</p>
<p style="margin-left:11%; margin-top: 1em"><b>grdraster</b>
"2 min Geoware" <b>−R</b> 20/25/-10/5
<b>−bo</b> >! triplets.b</p>
<h2>SEE ALSO
<a name="SEE ALSO"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em"><i><A HREF="gmtdefaults.html">gmtdefaults</A></i>(1),
<i><A HREF="GMT.html">GMT</A></i>(1), <i><A HREF="grdsample.html">grdsample</A></i>(1), <i><A HREF="grdfilter.html">grdfilter</A></i>(1)</p>
<h2>REFERENCES
<a name="REFERENCES"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em">Wessel, P., and
W. H. F. Smith, 2014, The Generic Mapping Tools (GMT)
version 4.5.12 Technical Reference & Cookbook,
SOEST/NOAA. <br>
Wessel, P., and W. H. F. Smith, 1998, New, Improved Version
of Generic Mapping Tools Released, EOS Trans., AGU, 79 (47),
p. 579. <br>
Wessel, P., and W. H. F. Smith, 1995, New Version of the
Generic Mapping Tools Released, EOS Trans., AGU, 76 (33), p.
329. <br>
Wessel, P., and W. H. F. Smith, 1995, New Version of the
Generic Mapping Tools Released,
http://www.agu.org/eos_elec/95154e.html, Copyright 1995 by
the American Geophysical Union. <br>
Wessel, P., and W. H. F. Smith, 1991, Free Software Helps
Map and Display Data, EOS Trans., AGU, 72 (41), p. 441.</p>
<hr>
</body>
</html>
|