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
|
<HTML>
<HEAD>
<TITLE>grdview</TITLE>
</HEAD>
<BODY>
<H1>grdview</H1>
<HR>
<PRE>
<!-- Manpage converted by man2html 3.0.1 -->
grdview - Create 3-D perspective grayshaded/colored image
or mesh from a 2-D grd file
</PRE>
<H2>SYNOPSIS</H2><PRE>
<B>grdview</B> <I>relief</I><B>_</B><I>file</I> <B>-J</B><I>parameters</I> [ <B>-B</B><I>tickinfo</I> ] [<B>-C</B><I>cpt</I>
<I>file</I>] [ <B>-E</B><I>view</I><B>_</B><I>az/view</I><B>_</B><I>el</I> ] [ <B>-G</B><I>drapefile</I>] [ <B>-I</B><I>intensfile</I>]
[ <B>-K</B> ] [ <B>-L</B>[<I>flags</I>] ] [ <B>-N</B><I>level</I>[/<I>r/g/b</I>]] [ <B>-O</B> ] [ <B>-P</B> ] [
<B>-Q</B><I>type</I> ] [ <B>-R</B><I>west/east/south/north/zmin/zmax</I>[<B>r</B>] ] [
<B>-S</B><I>smooth</I> ] [ <B>-T</B>[<B>s</B>] ] [ <B>-U</B>[<I>/dx/dy/</I>][<I>label</I>] ] [ <B>-V</B> ] [
<B>-W</B><I>type/pen</I> ] [ <B>-X</B><I>x-shift</I> ] [ <B>-Y</B><I>y-shift</I> ] [ <B>-Z</B><I>zlevel</I> ] [
<B>-c</B><I>copies</I> ]
</PRE>
<H2>DESCRIPTION</H2><PRE>
<B>grdview</B> reads a 2-D gridded file and produces a 3-D per
spective plot by drawing a mesh, painting a col
ored/grayshaded surface made up of polygons, or by scan
line conversion of these polygons to a rasterimage.
Options include draping a data set on top of a <A HREF="surface.html">surface</A>,
plotting of contours on top of the <A HREF="surface.html">surface</A>, and apply
artificial illumination based on intensities provided in a
separate grd file.
<I>relief</I><B>_</B><I>file</I>
2-D gridded data set to be imaged (the relief of
the surface).
<B>-J</B> 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 MEA
SURE_UNIT setting in .<A HREF="gmtdefaults.html">gmtdefaults</A>, but this can be
overridden on the command line by appending the c,
i, or m to the scale/width value.
<B>CYLINDRICAL</B> <B>PROJECTIONS:</B>
<B>-Jc</B><I>lon0/lat0/scale</I> (Cassini)
<B>-Jj</B><I>lon0/scale</I> (Miller)
<B>-Jm</B><I>scale</I> (Mercator - Greenwich and Equator as ori
gin)
<B>-Jm</B><I>lon0/lat0/scale</I> (Mercator - Give meridian and
standard parallel)
<B>-Joa</B><I>lon0/lat0/azimuth/scale</I> (Oblique Mercator -
point and azimuth)
<B>-Job</B><I>lon0/lat0/lon1/lat1/scale</I> (Oblique Mercator -
two points)
<B>-Joc</B><I>lon0/lat0/lonp/latp/scale</I> (Oblique Mercator -
point and pole)
<B>-Jq</B><I>lon0/scale</I> (Equidistant Cylindrical Projection
(Plate Carree))
<B>-Jt</B><I>lon0/scale</I> (TM - Transverse Mercator, with Equa
tor as y = 0)
<B>-Jt</B><I>lon0/lat0/scale</I> (TM - Transverse Mercator, set
<B>-Jy</B><I>lon0/lats/scale</I> (Basic Cylindrical Projection)
<B>AZIMUTHAL</B> <B>PROJECTIONS:</B>
<B>-Ja</B><I>lon0/lat0/scale</I> (Lambert).
<B>-Je</B><I>lon0/lat0/scale</I> (Equidistant).
<B>-Jf</B><I>lon0/lat0/horizon/scale</I> (Gnomonic).
<B>-Jg</B><I>lon0/lat0/scale</I> (Orthographic).
<B>-Js</B><I>lon0/lat0/</I>[<I>slat/</I>]<I>scale</I> (General Stereographic)
<B>CONIC</B> <B>PROJECTIONS:</B>
<B>-Jb</B><I>lon0/lat0/lat1/lat2/scale</I> (Albers)
<B>-Jd</B><I>lon0/lat0/lat1/lat2/scale</I> (Equidistant)
<B>-Jl</B><I>lon0/lat0/lat1/lat2/scale</I> (Lambert)
<B>MISCELLANEOUS</B> <B>PROJECTIONS:</B>
<B>-Jh</B><I>lon0/scale</I> (Hammer)
<B>-Ji</B><I>lon0/scale</I> (Sinusoidal)
<B>-Jk</B>[<B>f|s</B>]<I>lon0/scale</I> (Eckert IV (f) and VI (s))
<B>-Jn</B><I>lon0/scale</I> (Robinson)
<B>-Jr</B><I>lon0/scale</I> (Winkel Tripel)
<B>-Jv</B><I>lon0/scale</I> (Van der Grinten)
<B>-Jw</B><I>lon0/scale</I> (Mollweide)
<B>NON-GEOGRAPHICAL</B> <B>PROJECTIONS:</B>
<B>-Jp</B>[<B>a</B>]<I>scale</I>[<I>/origin</I>] (polar (theta,r) coordinates,
optional <B>a</B> for azimuths and offset theta [0])
<B>-Jx</B><I>x-scale</I>[<B>l|p</B><I>pow</I>][<I>/y-scale</I>[<B>l|p</B><I>pow</I>]] (Linear, log,
and power scaling)
More details can be found in the <B><A HREF="psbasemap.html">psbasemap</A></B> man
pages.
<B>-Jz</B> Sets the vertical scaling (for 3-D maps). Same syn
tax as <B>-Jx</B>.
</PRE>
<H2>OPTIONS</H2><PRE>
No space between the option flag and the associated argu
ments.
<B>-B</B> Sets map boundary tickmark intervals. See <B><A HREF="psbasemap.html">psbasemap</A></B>
for details.
<B>-C</B> name of the color palette file. Must be present if
you want (1) mesh plot with contours (<B>-Qm</B>), or (2)
shaded/colored perspective image (<B>-Qs</B> or <B>-Qi</B>). For
<B>-Qs</B>: You can specify that you want to skip a z-
slice by setting red = -; to use a pattern give red
= <B>P|p</B><I>dpi/pattern</I>[:<B>F</B><I>r/g/b</I>[<B>B</B><I>r/g/b</I>]].
<B>-G</B> Drape the image in <I>drapefile</I> on top of the relief
provided by <I>relief</I><B>_</B><I>file</I>. [Default is <I>relief</I><B>_</B><I>file</I>].
Note that <B>-Jz</B> and <B>-N</B> always refers to the
<I>relief</I><B>_</B><I>file</I>. The <I>drapefile</I> only provides the infor
mation pertaining to colors.
<B>-I</B> Gives the name of a grdfile with intensities in the
(-1,+1) range. [Default is no illumination].
<B>-K</B> More <I>PostScript</I> code will be appended later
[Default terminates the plot system].
<B>-L</B> Boundary condition <I>flags</I> may be <I>x</I> or <I>y</I> or <I>xy</I> indi
cating data is periodic in range of x or y or both,
or <I>flags</I> may be <I>g</I> indicating geographical condi
tions (x and y are lon and lat). [Default uses
"natural" conditions (second partial derivative
normal to edge is zero).] If no <I>flags</I> are set, use
bilinear rather than the default bicubic resampling
when draping is required.
<B>-N</B> 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.
<B>-O</B> Selects Overlay plot mode [Default initializes a
new plot system].
<B>-P</B> Selects Portrait plotting mode [<B><A HREF="GMT.html">GMT</A></B> Default is
Landscape, see gmtdefaults to change this].
<B>-R</B> <I>west,</I> <I>east,</I> <I>south,</I> and <I>north</I> specify the Region of
interest. To specify boundaries in degrees and min
utes [and seconds], use the dd:mm[:ss] format.
Append <B>r</B> if lower left and upper right map coordi
nates 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 <I>relief</I><B>_</B><I>file</I>]. You
may ask for a larger <I>w/e/s/n</I> region to have more
room between the image and the axes. A smaller
region than specified in the <I>relief</I><B>_</B><I>file</I> will
result in a subset of the grid.
<B>-Q</B> Select one of three settings: 1. Specify <B>m</B> for mesh
plot [Default], and optionally append /r/g/b for a
different mesh paint [white]. 2. Specify <B>s</B> for
surface plot, and optionally append <B>m</B> to have mesh
lines drawn on top of surface. 3. Specify <B>i</B> for
image plot, and optionally append the effective dpi
resolution for the rasterization [100]. For any of
these choices, you may force a monochrome image by
<B>-S</B> Smooth the contours before plotting (see <B>grdcon</B>
<B>tour</B>) [Default is no smoothing]
<B>-T</B> Plot image without any interpolation. This involves
converting each node-centered bin into a polygon
which is then painted separately. Append <B>s</B> to skip
nodes with z = NaN. This option is useful for cate
gorical data where interpolating between values is
meaningless.
<B>-U</B> Draw Unix System time stamp on plot. User may spec
ify where the lower left corner of the stamp should
fall on the page relative to lower left corner of
plot. Optionally, append a label, or <B>c</B> (which will
plot the command string.). The GMT parameters
UNIX_TIME and UNIX_TIME_POS can affect the appear
ance; see the <B><A HREF="gmtdefaults.html">gmtdefaults</A></B> man page for details.
<B>-V</B> Selects verbose mode, which will send progress
reports to stderr [Default runs "silently"].
<B>-Wc</B> Draw contour lines on top of surface or mesh (not
image). Append pen attributes used for the con
tours. [Default: width = 3, color = 0/0/0, texture
= solid].
<B>-Wm</B> Sets the pen attributes used for the mesh.
[Default: width = 1, color = 0/0/0, texture =
solid]. You must also select <B>-Qm</B> or <B>-Qsm</B> for mesh
lines to be drawn.
<B>-X</B> <B>-Y</B> Shift origin of plot by (<I>x-shift,y-shift</I>). Prepend
<B>a</B> for absolute coordinates; the default (<B>r</B>) will
reset plot origin.
<B>-Z</B> Sets the z-level of the basemap [0].
<B>-c</B> Specifies the number of plot copies. [Default is 1]
</PRE>
<H2>EXAMPLES</H2><PRE>
To make a mesh plot from the file hawaii_grav.grd and
drawing the contours given in the color palette file
hawaii.cpt on a Lambert map at 1.5 cm/degree along the
standard parallels 18 and 24, with vertical scale 20
mgal/cm, and looking at the surface from SW at 30 degree
elevation, try
grdview hawaii_grav.grd <B>-Jl</B>18/24/1.5<B>c</B> <B>-C</B>hawaii.cpt
<B>-Jz</B>0.05<B>c</B> <B>-Qm</B> <B>-N</B>-100 <B>-E</B>225/30 <B>-Wc</B> > hawaii_grav_image.ps
To create a illuminated color perspective plot of the
marks every 5 units, with intensities provided by the file
intens.grd, and looking from the SE, try
grdview image.grd <B>-Jx</B>10.0<B>c</B> <B>-C</B>color.rgb <B>-Qs</B> <B>-E</B>135/30 <B>-I</B>in
tens.grd > image3D.ps
To make the same plot using the rastering option with dpi
= 50, try
grdview image.grd <B>-Jx</B>10.0<B>c</B> <B>-C</B>color.rgb <B>-Qi</B>50 <B>-E</B>135/30
<B>-I</B>intens.grd > image3D.ps
To create a color <I>PostScript</I> perspective plot of the grid
ded data set magnetics.grd, using the color palette file
mag_intens.cpt, draped over the relief given by the file
topography.grd, with Mercator map width of 6 inch and
tickmarks every 1 degree, with intensities provided by the
file topo_intens.grd, and looking from the SE, try
grdview topography.grd <B>-JM</B>6<B>i</B> <B>-G</B>magnetics.grd
<B>-C</B>mag_intens.cpt <B>-Qs</B> <B>-E</B>140/30 <B>-I</B>topo_intens.grd >
draped3D.ps
</PRE>
<H2>BUGS</H2><PRE>
For the <B>-Qs</B> option: <I>PostScript</I> 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 <B><A HREF="grdsample.html">grdsample</A></B> or use a
finer grid size when running gridding programs like <B>sur</B>
<B>face</B> or <B><A HREF="nearneighbor.html">nearneighbor</A></B>. Unfortunately, this produces huge
<I>PostScript</I> files. The alternative is to use the <B>-Qi</B>
option, which computes bilinear or bicubic continuous
color variations within polygons by using scanline conver
sion to image the polygons.
</PRE>
<H2>SEE ALSO</H2><PRE>
<I>gmt</I>(l), <I><A HREF="grdcontour.html">grdcontour</A></I>(l), <I><A HREF="grdimage.html">grdimage</A></I>(l), <I><A HREF="nearneighbor.html">nearneighbor</A></I>(l),
<I><A HREF="psbasemap.html">psbasemap</A></I>(l), <I><A HREF="pscontour.html">pscontour</A></I>(l), <I><A HREF="pstext.html">pstext</A></I>(l), <I><A HREF="surface.html">surface</A></I>(l)
</PRE>
<HR>
<ADDRESS>
Man(1) output converted with
<a href="http://www.oac.uci.edu/indiv/ehood/man2html.html">man2html</a>
</ADDRESS>
</BODY>
</HTML>
<body bgcolor="#ffffff">
|