NAME

     grdview - Create 3-D perspective grayshaded/colored image or
     mesh from a 2-D grd file


SYNOPSIS

     grdview relief_file -Jparameters [ -Btickinfo ] [- Ccptfile]
     [  - Dndec  ] [ -Eview_az/view_el ] [ -Fred/green/blue ] [ -
     Gdrapefile] [ -Iintensfile]  [  - K  ]  [  - Mmeshpen]  [  -
     Nlevel[/r/g/b]]   [   - O  ]  [  - P  ]  [  - Qtype  ]  [  -
     Rwest/east/south/north/zmin/zmax[r] ]  [  - Ssmooth  ]  [  -
     U[/dx/dy/][label]  ] [ -V ] [ -Wcontourpen ] [ -Xx-shift ] [
     -Yy-shift ] [ -Zzlevel ] [ -ccopies ]


DESCRIPTION

     grdview reads a 2-D gridded file and produces a 3-D perspec-
     tive  plot  by drawing a mesh, painting a colored/grayshaded
     surface made up of polygons, or by  scanline  conversion  of
     these  polygons to a rasterimage.  Options include draping a
     data set on top of a surface, plotting of contours on top of
     the  surface,  and  apply  artificial  illumination based on
     intensities provided in a separate grd file.

     relief_file
          2-D gridded data set to be imaged (the  relief  of  the
          surface).

     -J    Selects the  map  projection.  Scale  is  inch/degree,
          1:xxxxx. or width in inch (upper case modifier).

          CYLINDRICAL PROJECTIONS:

          -Jclon0/lat0/scale (Cassini)
          -Jmscale (Mercator - Greenwich and Equator as origin)
          -Jmlon0/lat0/scale (Mercator - Give meridian and  stan-
          dard parallel)
          -Joalon0/lat0/azimuth/scale (Oblique Mercator  -  point
          and azimuth)
          -Joblon0/lat0/lon1/lat1/scale (Oblique Mercator  -  two
          points)
          -Joclon0/lat0/lonp/latp/scale (Oblique Mercator - point
          and pole)
          - Jqlon0/scale  (Equidistant   Cylindrical   Projection
          (Plate Carree))
          -Jtlon0/scale (TM - Transverse Mercator)
          -Juzone/scale (UTM - Universal Transverse Mercator)
          -Jylon0/lats/scale (Basic Cylindrical Projection)

          AZIMUTHAL PROJECTIONS:

          -Jalon0/lat0/scale (Lambert).
          -Jelon0/lat0/scale (Equidistant).
          -Jglon0/lat0/scale (Orthographic).
          -Jslon0/lat0/scale (General Stereographic)

          CONIC PROJECTIONS:

          -Jblon0/lat0/lat1/lat2/scale (Albers)
          -Jllon0/lat0/lat1/lat2/scale (Lambert)

          MISCELLANEOUS PROJECTIONS:

          -Jhlon0/scale (Hammer)
          -Jilon0/scale (Sinusoidal)
          -Jklon0/scale (Eckert VI)
          -Jnlon0/scale (Robinson)
          -Jrlon0/scale (Winkel Tripel)
          -Jwlon0/scale (Mollweide)

          NON-GEOGRAPHICAL PROJECTIONS:

          -Jpscale (Linear projection for polar (theta,r) coordi-
          nates)
          -Jxx-scale[l|ppow][/y-scale[l|ppow]] (Linear, log,  and
          power scaling)
          More details can be found in the psbasemap manpages.

     -Jz   Sets the vertical scaling (for 3-D maps).  Same syntax
          as -Jx.


OPTIONS

     No space between the option flag and  the  associated  argu-
     ments.

     -B    Sets map boundary tickmark  intervals.  See  psbasemap
          for details.

     -C    name of the color palette file.  Must  be  present  if
          you  want  (1)  mesh  plot  with contours (-Qm), or (2)
          shaded/colored perspective image (-Qs or -Qi).

     -D    Sets number of decimals used to specify color/gray  in
          PostScript  output.  Makes  smaller  output file at the
          expense of less color resolution.  E.g., 3 gives  1000,
          2  gives  100, and 1 gives 10 choices each or r, g, and
          b, values [3].

     -E    Sets the view point by specifying azimuth  and  eleva-
          tion in degrees. [Default is 180/90]

     -F    Sets the color used for Frame and annotation. [Default
          is black]

     -G    Drape the image in drapefile on top of the relief pro-
          vided  by  relief_file. [Default is relief_file].  Note
          that -Jz and -N always refers to the relief_file.   The
          drapefile  only  provides the information pertaining to
          colors.

     -I    Gives the name of a grdfile with  intensities  in  the
          (-1,+1) range. [Default is no illumination].

     -K    More PostScript code will be appended  later  [Default
          terminates the plot system].

     -M    Sets the pen attributes used for the  mesh.  [Default:
          width = 1, color = 0/0/0, texture = solid]

     -N    Draws a plane at this z-level.  If the optional  r/g/b
          is  provided,  the frontal facade between the plane and
          the data perimeter is colored.

     -O    Selects Overlay plot mode [Default initializes  a  new
          plot system].

      - P    Selects  Portrait  plotting  mode  [GMT  Default  is
          Landscape, see gmtdefaults to change this].

     -R    west, east, south, and north  specify  the  Region  of
          interest.  To specify boundaries in degrees and minutes
          [and seconds], use the dd:mm[:ss] format.  Append r  if
          lower  left  and  upper right map coordinates are given
          instead of wesn.  This option may be used  to  indicate
          the  range  used  for  the  3-D axes [Default is region
          given by the relief_file].  You may ask  for  a  larger
          w/e/s/n  region to have more room between the image and
          the axes.  A  smaller  region  than  specified  in  the
          relief_file will result in a subset of the grid.

     -Q    Select one of three settings: 1. Specify  m  for  mesh
          plot [Default], and optionally append /r/g/b for a dif-
          ferent mesh paint [white].  2. Specify  s  for  surface
          plot,  and optionally append m to have mesh lines drawn
          on top of surface.  3. Specify i for  image  plot,  and
          optionally  append the effective dpi resolution for the
          rasterization [100].  This option will apply  a  simple
          clippath to avoid overwriting the background (since the
          resulting image is rectangular).  Depending on the pro-
          jection  this  may backfire; if so turn clipping off by
          using upper case I.  For any of these choices, you  may
          force  a  monochrome  image by appending g.  Colors are
          then converted to shades of gray using the (television)
          YIQ transformation.

     -S    Smooth the contours before plotting  (see  grdcontour)
          [Default is no smoothing]

     -U    Draw Unix System time stamp on plot.  User may specify
          where the lower left corner of the stamp should fall on
          the page relative to lower left corner of plot in  inch
          [Default   is  (-0.75,-0.75)].   Optionally,  append  a
          label, or c (which will plot the command string.)

     -V    Selects verbose mode, which will send progress reports
          to stderr [Default runs "silently"].

     -W    Draw contour lines on top  of  surface  or  mesh  (not
          image).   Append  pen attributes used for the contours.
          [Default: width = 3, color = 0/0/0, texture = solid].

     -X -Y
          Shift  origin  of  plot   by   (x-shift,y-shift)   inch
          [Default is (1,1) for new plots, (0,0) for overlays].

     -Z    Sets the z-level of the basemap [0].

     -c    Specifies the number of plot copies. [Default is 1]


EXAMPLES

     To make a mesh plot from the file hawaii_grav.grd and  draw-
     ing  the contours given in the color palette file hawaii.cpt
     on a Lambert map  at  0.5  inch/degree  along  the  standard
     parallels  18  and 24, with vertical scale 50 mgal/inch, and
     looking at the surface from SW at 30 degree elevation, try

     grdview hawaii_grav.grd -Jl18/24/0.5 -Chawaii.cpt -JzLEN_3 -
     Qm -N-100 -E225/30 -W > hawaii_grav_image.ps

     To create a illuminated color perspective plot of the  grid-
     ded  data  set  image.grd,  using  the  color  palette  file
     color.rgb, with linear scaling at 10 inch/x-unit  and  tick-
     marks  every  5 units, with intensities provided by the file
     intens.grd, and looking from the SE, try

     grdview image.grd - Jx10.0  - Ccolor.rgb  - Qs  - E135/30  -
     Iintens.grd  > image3D.ps

     To make the same plot using the rastering option with dpi  =
     50, try

     grdview image.grd -Jx10.0 - Ccolor.rgb  - Qi50  - E135/30  -
     Iintens.grd  > image3D.ps

     To create a color PostScript perspective plot of the gridded
     data   set  magnetics.grd,  using  the  color  palette  file
     mag_intens.cpt, draped over the relief  given  by  the  file
     topography.grd,  with  Mercator scaling at 1 inch/degree and
     tickmarks every 1 degree, with intensities provided  by  the
     file topo_intens.grd, and looking from the SE, try
     grdview topography.grd -Jm1 -Gmagnetics.grd -Cmag_intens.cpt
     -Qs -E140/30 -Itopo_intens.grd  > draped3D.ps


BUGS

     For the -Qs option:  PostScript provides no way of  smoothly
     varying  colors  within  a  polygon, so colors can only vary
     from polygon to polygon.  To obtain smooth images  this  way
     you  may  resample  the  grdfile(s) using grdsample or use a
     finer grid size when running gridding programs like  surface
     or   nearneighbor.    Unfortunately,   this   produces  huge
     PostScript files.  The alternative is to use the -Qi option,
     which  computes  quasi-bilinear  continuous color variations
     within polygons by using scanline conversion  to  image  the
     polygons.   However,  when using -Qi, the -B option is deac-
     tivated; plot axes separately as a psbasemap overlay.

     Header must be plotted separately using pstext.


SEE ALSO

     gmt, grdcontour, grdimage, nearneighbor,  psbasemap,  pscon-
     tour, pstext, surface


REFERENCES

     Wessel, P., and W. H. F. Smith, 1995,  The  Generic  Mapping
     Tools  (GMT)  version  3.0  Technical  Reference & Cookbook,
     SOEST/NOAA.
     Wessel, P., and W. H. F. Smith, 1995,  New  Version  of  the
     Generic Mapping Tools Released, EOS Trans. AGU, 76, p. 329.
     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.
     Wessel, P., and W. H. F. Smith, 1991,  Free  Software  Helps
     Map and Display Data, EOS Trans. AGU, 72, p. 441.