1GRDRASTER(1)                 Generic Mapping Tools                GRDRASTER(1)
2
3
4

NAME

6       grdraster  -  extract  subregion  from a binary raster and write a grid
7       file
8

SYNOPSIS

10       grdraster [ filenumber | "text pattern" ] -Rwest/east/south/north[r]  [
11       -Ggrdfile  ]  [  -Ixinc[m|c][/yinc[m|c]]  ]  [  -Jparameters ] [ -V ] [
12       -bo[s|S|d|D[ncol]|c[var1/...]] ]
13

DESCRIPTION

15       grdraster reads a file called grdraster.info from the  current  working
16       directory,  the  directories  pointed  to  by the environment variables
17       $GMT_DATADIR and  $GMT_USERDIR,  or  in  $GMT_SHAREDIR/dbase  (in  that
18       order).   The  file grdraster.info defines binary arrays of data stored
19       in scan-line format in data files.  Each file is given a filenumber  in
20       the  info file.  grdraster figures out how to load the raster data into
21       a grid file spanning a region defined by -R.  By default the grid spac‐
22       ing equals the raster spacing.  The -I option may be used to sub-sample
23       the raster data.  No filtering or interpolating is done,  however;  the
24       x_inc  and y_inc of the grid must be multiples of the increments of the
25       raster file and grdraster simply takes every n'th point.  The output of
26       grdraster is either grid or pixel registered depending on the registra‐
27       tion of the raster used.  It is up to the GMT system person to maintain
28       the  grdraster.info  file  in  accordance with the available rasters at
29       each site.  Raster data sets are not  supplied  with  GMT  but  can  be
30       obtained  by  anonymous  ftp  and  on  CD-ROM (see README page in dbase
31       directory).  grdraster will list the available files  if  no  arguments
32       are  given.  Finally, grdraster will write xyz-triplets to stdout if no
33       output gridfile name is given
34
35       filenumber
36              If  an  integer  matching  one  of  the  files  listed  in   the
37              grdraster.info  file is given we will use that data set, else we
38              will match the given text pattern with the data set  description
39              in order to determine the data set.
40
41
42       -R     west, east, south, and north specify the Region of interest, and
43              you   may   specify   them   in   decimal    degrees    or    in
44              [+-]dd:mm[:ss.xxx][W|E|S|N]  format.  Append r if lower left and
45              upper right map coordinates are given instead of  w/e/s/n.   The
46              two  shorthands  -Rg  and -Rd stand for global domain (0/360 and
47              -180/+180 in longitude respectively, with -90/+90 in  latitude).
48              Alternatively, specify the name of an existing grid file and the
49              -R settings (and grid spacing, if applicable)  are  copied  from
50              the  grid.  If r is appended, you may also specify a map projec‐
51              tion to define the shape of your region.  The output region will
52              be  rounded  off  to  the nearest whole grid-step in both dimen‐
53              sions.
54

OPTIONS

56       -G     Name of output grid file.  If not set, the grid will be  written
57              as ASCII (or binary; see -bo xyz-triplets to stdout instead.
58
59       -I     x_inc  [and  optionally  y_inc] is the grid spacing. Optionally,
60              append a suffix modifier.  Geographical  (degrees)  coordinates:
61              Append  m  to indicate arc minutes or c to indicate arc seconds.
62              If one of the units e, k, i,  or  n  is  appended  instead,  the
63              increment  is assumed to be given in meter, km, miles, or nauti‐
64              cal miles, respectively, and will be converted to the equivalent
65              degrees longitude at the middle latitude of the region (the con‐
66              version depends on ELLIPSOID).  If /y_inc is given but set to  0
67              it  will be reset equal to x_inc; otherwise it will be converted
68              to degrees latitude.  All coordinates: If = is appended then the
69              corresponding max x (east) or y (north) may be slightly adjusted
70              to fit exactly the given increment [by default the increment may
71              be adjusted slightly to fit the given domain].  Finally, instead
72              of giving an increment you  may  specify  the  number  of  nodes
73              desired  by  appending  +  to the supplied integer argument; the
74              increment is then recalculated from the number of nodes and  the
75              domain.   The  resulting  increment value depends on whether you
76              have selected a gridline-registered  or  pixel-registered  grid;
77              see  Appendix  B  for  details.  Note: if -Rgrdfile is used then
78              grid spacing has already been initialized; use  -I  to  override
79              the values.
80
81       -J     Selects  the  map  projection. Scale is UNIT/degree, 1:xxxxx, or
82              width in UNIT (upper case modifier).  UNIT is cm,  inch,  or  m,
83              depending on the MEASURE_UNIT setting in .gmtdefaults4, but this
84              can be overridden on the command line by appending c, i, or m to
85              the  scale/width  value.   When  central  meridian  is optional,
86              default is center of longitude  range  on  -R  option.   Default
87              standard  parallel  is  the equator.  For map height, max dimen‐
88              sion, or min dimension, append h, +, or - to the width,  respec‐
89              tively.
90              More details can be found in the psbasemap man pages.
91
92              CYLINDRICAL PROJECTIONS:
93
94              -Jclon0/lat0/scale (Cassini)
95              -Jcyl_stere/[lon0/[lat0/]]scale (Cylindrical Stereographic)
96              -Jj[lon0/]scale (Miller)
97              -Jm[lon0/[lat0/]]scale (Mercator)
98              -Jmlon0/lat0/scale (Mercator - Give meridian and standard paral‐
99              lel)
100              -Jo[a]lon0/lat0/azimuth/scale  (Oblique  Mercator  -  point  and
101              azimuth)
102              -Jo[b]lon0/lat0/lon1/lat1/scale (Oblique Mercator - two points)
103              -Joclon0/lat0/lonp/latp/scale  (Oblique  Mercator  -  point  and
104              pole)
105              -Jq[lon0/[lat0/]]scale (Cylindrical Equidistant)
106              -Jtlon0/[lat0/]scale (TM - Transverse Mercator)
107              -Juzone/scale (UTM - Universal Transverse Mercator)
108              -Jy[lon0/[lat0/]]scale (Cylindrical Equal-Area)
109
110              CONIC PROJECTIONS:
111
112              -Jblon0/lat0/lat1/lat2/scale (Albers)
113              -Jdlon0/lat0/lat1/lat2/scale (Conic Equidistant)
114              -Jllon0/lat0/lat1/lat2/scale (Lambert Conic Conformal)
115              -Jpoly/[lon0/[lat0/]]scale ((American) Polyconic)
116
117              AZIMUTHAL PROJECTIONS:
118
119              -Jalon0/lat0[/horizon]/scale (Lambert Azimuthal Equal-Area)
120              -Jelon0/lat0[/horizon]/scale (Azimuthal Equidistant)
121              -Jflon0/lat0[/horizon]/scale (Gnomonic)
122              -Jglon0/lat0[/horizon]/scale (Orthographic)
123              -Jglon0/lat0/altitude/azimuth/tilt/twist/Width/Height/scale
124              (General Perspective).
125              -Jslon0/lat0[/horizon]/scale (General Stereographic)
126
127              MISCELLANEOUS PROJECTIONS:
128
129              -Jh[lon0/]scale (Hammer)
130              -Ji[lon0/]scale (Sinusoidal)
131              -Jkf[lon0/]scale (Eckert IV)
132              -Jk[s][lon0/]scale (Eckert VI)
133              -Jn[lon0/]scale (Robinson)
134              -Jr[lon0/]scale (Winkel Tripel)
135              -Jv[lon0/]scale (Van der Grinten)
136              -Jw[lon0/]scale (Mollweide)
137
138              NON-GEOGRAPHICAL PROJECTIONS:
139
140              -Jp[a]scale[/origin][r|z] (Polar coordinates (theta,r))
141              -Jxx-scale[d|l|ppow|t|T][/y-scale[d|l|ppow|t|T]]  (Linear,  log,
142              and power scaling)
143
144       -V     Selects verbose mode, which will send progress reports to stderr
145              [Default runs "silently"].
146
147       -bo    Selects  binary  output.  Append s for single precision [Default
148              is d (double)].  Uppercase S  or  D  will  force  byte-swapping.
149              Optionally,  append  ncol, the number of desired columns in your
150              binary output file.  This option applies only if  no  -G  option
151              has been set.
152

EXAMPLES

154       To extract data from raster 1, taking one point every 30 minutes, in an
155       area extended beyond 360 degrees to allow later filtering, run
156
157       grdraster 1 -R-4/364/-62/62 -I30m -Gdata.grd
158
159       To obtain data for an oblique Mercator projection we  need  to  extract
160       more  data that is actually used.  This is necessary because the output
161       of grdraster has edges defined by parallels and  meridians,  while  the
162       oblique  map  in general does not.  Hence, to get all the data from the
163       ETOPO2 data needed to make a contour map for the region defined by  its
164       lower left and upper right corners and the desired projection, use
165
166       grdraster ETOPO2 -R160/20/220/30r -Joc190/25.5/292/69/1 -Gdata.grd
167
168       To  extract  data  from  the 2 min Geoware relief blend and write it as
169       binary double precision xyz-triplets to standard output:
170
171       grdraster "2 min Geoware" -R20/25/-10/5  -bo >! triplets.b
172
173

SEE ALSO

175       gmtdefaults(1), GMT(1), grdsample(1), grdfilter(1)
176

REFERENCES

178       Wessel, P., and W. H. F. Smith, 2009, The Generic Mapping  Tools  (GMT)
179       version 4.5.0 Technical Reference & Cookbook, SOEST/NOAA.
180       Wessel,  P., and W. H. F. Smith, 1998, New, Improved Version of Generic
181       Mapping Tools Released, EOS Trans., AGU, 79 (47), p. 579.
182       Wessel, P., and W. H. F. Smith, 1995, New Version of the  Generic  Map‐
183       ping Tools Released, EOS Trans., AGU, 76 (33), p. 329.
184       Wessel,  P.,  and W. H. F. Smith, 1995, New Version of the Generic Map‐
185       ping Tools Released, http://www.agu.org/eos_elec/95154e.html, Copyright
186       1995 by the American Geophysical Union.
187       Wessel,  P., and W. H. F. Smith, 1991, Free Software Helps Map and Dis‐
188       play Data, EOS Trans., AGU, 72 (41), p. 441.
189
190
191
192GMT 4.5.6                         10 Mar 2011                     GRDRASTER(1)
Impressum