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

NAME

6       img2grd - Extract region of img in Mercator or geographic form
7

SYNOPSIS

9       img2grd  imgfile  -Ggrdfile -Rwest/east/south/north[r] -Ttype  [ -C ] [
10       -Dminlat/maxlat ] [ -E ] [ -L ] [ -M ] [ -Nnavg ] [ -Sscale ] [ -V ]  [
11       -Wmaxlon ] [ -mminutes ]
12

DESCRIPTION

14       img2grd  is  a  front-end to img2mercgrd which reads an img format file
15       and creates a grid file.  The -M option dictates  whether  or  not  the
16       Spherical Mercator projection of the img file is preserved.
17
18       imgfile
19              An img format file such as the marine gravity or seafloor topog‐
20              raphy fields estimated from satellite altimeter data by Sandwell
21              and  Smith.   If  the  user  has  set  an  environment  variable
22              $GMT_DATADIR, then img2mercgrd  will  try  to  find  imgfile  in
23              $GMT_DATADIR; else it will try to open imgfile directly.
24
25       -G     grdfile is the name of the output grid file.
26
27       -R     west, east, south, and north specify the Region of interest, and
28              you   may   specify   them   in   decimal    degrees    or    in
29              [+-]dd:mm[:ss.xxx][W|E|S|N]  format.  Append r if lower left and
30              upper right map coordinates are given instead of  w/e/s/n.   The
31              two  shorthands  -Rg  and -Rd stand for global domain (0/360 and
32              -180/+180 in longitude respectively, with -90/+90 in  latitude).
33              Alternatively, specify the name of an existing grid file and the
34              -R settings (and grid spacing, if applicable)  are  copied  from
35              the grid.
36
37       -T     type  handles  the encoding of constraint information.  type = 0
38              indicates that no such information is encoded in  the  img  file
39              (used  for  pre-1995  versions of the gravity data) and gets all
40              data.  type > 0 indicates that constraint information is encoded
41              (1995 and later (current) versions of the img files) so that one
42              may produce a grid file as follows: -T1 gets data values at  all
43              points,  -T2  gets  data values at constrained points and NaN at
44              interpolated points; -T3 gets 1 at constrained points and  0  at
45              interpolated points.
46

OPTIONS

48       -C     Set the x and y Mercator coordinates relative to projection cen‐
49              ter  [Default  is  relative  to  lower  left  corner  of  grid].
50              Requires -M.
51
52       -D     Use the extended latitude range -80.738/+80.738.  Alternatively,
53              append minlat/maxlat as the latitude extent  of  the  input  img
54              file.  [Default is -72.006/72.006].
55
56       -E     Can  be  used when -M is not set to force the final grid to have
57              the exact same region as requested with  -R.   By  default,  the
58              final  region  is  a  direct projection of the original Mercator
59              region and will typically extend slightly beyond  the  requested
60              latitude  range,  and furthermore the grid increment in latitude
61              does not match the  longitude  increment.   However,  the  extra
62              resampling introduces small interpolation errors and should only
63              be used if the output grid must match the requested  region  and
64              have  x_inc  = y_inc.  In this case the region set by -R must be
65              given in multiples of the increment (.e.g, -R0/45/45/72).
66
67       -L     With no other arguments, list  all  *.img  files  found  in  the
68              directory  pointed  to by $GMT_DATADIR, or the current directory
69              if not defined.  Ignored if other options  are  present  on  the
70              command line.
71
72       -M     Output  a  Spherical  Mercator  grid  [Default  is  a geographic
73              lon/lat grid].
74
75       -N     Average the values in the input img pixels  into  navg  by  navg
76              squares,  and  create one output pixel for each such square.  If
77              used with -T3 it will report an average constraint between 0 and
78              1.   If  used  with -T2 the output will be average data value or
79              NaN according to whether average constraint is > 0.5.  navg must
80              evenly  divide  into  the  dimensions  of the imgfile in pixels.
81              [Default 1 does no averaging].
82
83       -S     Multiply the img file values by scale  before  storing  in  grid
84              file.   [Default  is 1.0].  For recent img files: img topo files
85              are stored in (corrected) meters [-S1]; free-air  gravity  files
86              in  mGal*10  [-S0.1  to get mGal]; vertical  deflection files in
87              microradians*10 [-S0.1 to get  microradians],  vertical  gravity
88              gradient files in Eotvos*50 [-S0.02 to get Eotvos, or -S0.002 to
89              get mGal/km]).
90
91       -V     Selects verbose mode, which will send progress reports to stderr
92              [Default runs "silently"].  Particularly recommended here, as it
93              is helpful to see how the coordinates are adjusted.
94
95       -m     Indicate minutes as the width of an input img pixel  in  minutes
96              of longitude.  [Default is 2.0].
97
98       -W     Indicate maxlon as the maximum longitude extent of the input img
99              file.  Versions since 1995 have had maxlon = 360.0,  while  some
100              earlier files had maxlon = 390.0.  [Default is 360.0].
101

EXAMPLES

103       To  extract data in the region -R-40/40/-70/-30 from world_grav.img.7.2
104       and preserve the Mercator gridding:
105
106       img2grd world_grav.img.7.2 -Gmerc_grav.grd -R-40/40/-70/-30 -M -T1 -V
107
108       Without the -M option the same command will yield a geographic grid.
109

SEE ALSO

111       GMT(1), img2mercgrd(1)
112
113
114
115GMT 4.5.6                         10 Mar 2011                       IMG2GRD(1)
Impressum