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_USERDIR and  $GMT_GRIDDIR,  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              If  r  is  appended,  you  may  also specify a map projection to
49              define the shape of your region.   The  output  region  will  be
50              rounded off to the nearest whole grid-step in both dimensions.
51

OPTIONS

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

EXAMPLES

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

SEE ALSO

169       gmtdefaults(1), GMT(1), grdsample(1), grdfilter(1)
170

REFERENCES

172       Wessel,  P.,  and W. H. F. Smith, 2005, The Generic Mapping Tools (GMT)
173       version 4.1 Technical Reference & Cookbook, SOEST/NOAA.
174       Wessel, P., and W. H. F. Smith, 1998, New, Improved Version of  Generic
175       Mapping Tools Released, EOS Trans., AGU, 79 (47), p. 579.
176       Wessel,  P.,  and W. H. F. Smith, 1995, New Version of the Generic Map‐
177       ping Tools Released, EOS Trans., AGU, 76 (33), p. 329.
178       Wessel, P., and W. H. F. Smith, 1995, New Version of the  Generic  Map‐
179       ping Tools Released, http://www.agu.org/eos_elec/95154e.html, Copyright
180       1995 by the American Geophysical Union.
181       Wessel, P., and W. H. F. Smith, 1991, Free Software Helps Map and  Dis‐
182       play Data, EOS Trans., AGU, 72 (41), p. 441.
183
184
185
186GMT 4.3.1                         15 May 2008                     GRDRASTER(1)
Impressum