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
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<!--Converted with LaTeX2HTML 99.2beta8 (1.46)
original version by: Nikos Drakos, CBLU, University of Leeds
* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
* with significant contributions from:
Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
<HTML>
<HEAD>
<TITLE>6.2 Image presentations</TITLE>
<META NAME="description" CONTENT="6.2 Image presentations">
<META NAME="keywords" CONTENT="GMT_Docs">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="LaTeX2HTML v99.2beta8">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
<LINK REL="STYLESHEET" HREF="GMT_Docs.css">
<LINK REL="next" HREF="node76.html">
<LINK REL="previous" HREF="node74.html">
<LINK REL="up" HREF="node73.html">
<LINK REL="next" HREF="node76.html">
</HEAD>
<BODY bgcolor="#ffffff">
<!--Navigation Panel-->
<A NAME="tex2html2080"
HREF="node76.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.gif"></A>
<A NAME="tex2html2074"
HREF="node73.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.gif"></A>
<A NAME="tex2html2068"
HREF="node74.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.gif"></A>
<A NAME="tex2html2076"
HREF="node1.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.gif"></A>
<A NAME="tex2html2078"
HREF="node149.html">
<IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index.gif"></A>
<BR>
<B> Next:</B> <A NAME="tex2html2081"
HREF="node76.html">6.3 Spectral estimation and</A>
<B> Up:</B> <A NAME="tex2html2075"
HREF="node73.html">6. Cook-book</A>
<B> Previous:</B> <A NAME="tex2html2069"
HREF="node74.html">6.1 The making of</A>
  <B> <A NAME="tex2html2077"
HREF="node1.html">Contents</A></B>
  <B> <A NAME="tex2html2079"
HREF="node149.html">Index</A></B>
<BR>
<BR>
<!--End of Navigation Panel-->
<H1><A NAME="SECTION001420000000000000000"></A>
<A NAME="9983"></A>
<BR>
6.2 Image presentations
</H1>
<P>
As our second example we will demonstrate how to make color
images from gridded data sets (again, we will deferr the
actual making of gridded files to later examples). We will
use the supplemental program <A NAME="tex2html357"
HREF="../grdraster.html"><I><B>grdraster</B></I></A><A NAME="10023"></A> to extract 2-D
grdfiles of bathymetry and Geosat geoid heights and put the
two images on the same page. The region of interest is the
Hawaiian islands, and due to the oblique trend of the island
chain we prefer to rotate our geographical data sets using
an oblique Mercator projection defined by the hotspot pole
at (68<IMG
WIDTH="11" HEIGHT="15" ALIGN="BOTTOM" BORDER="0"
SRC="img61.gif"
ALT="$^{o}$">W, 69<IMG
WIDTH="11" HEIGHT="15" ALIGN="BOTTOM" BORDER="0"
SRC="img61.gif"
ALT="$^{o}$">N). We choose the point (190<IMG
WIDTH="11" HEIGHT="15" ALIGN="BOTTOM" BORDER="0"
SRC="img61.gif"
ALT="$^{o}$">,
25.5<IMG
WIDTH="11" HEIGHT="15" ALIGN="BOTTOM" BORDER="0"
SRC="img61.gif"
ALT="$^{o}$">) to be the center of our projection (e.g., the
local origin), and we want to image a rectangular region
defined by the longitudes and latitudes of the lower left
and upper right corner of region. In our case we choose
(160<IMG
WIDTH="11" HEIGHT="15" ALIGN="BOTTOM" BORDER="0"
SRC="img61.gif"
ALT="$^{o}$">, 20<IMG
WIDTH="11" HEIGHT="15" ALIGN="BOTTOM" BORDER="0"
SRC="img61.gif"
ALT="$^{o}$">) and (220<IMG
WIDTH="11" HEIGHT="15" ALIGN="BOTTOM" BORDER="0"
SRC="img61.gif"
ALT="$^{o}$">, 30<IMG
WIDTH="11" HEIGHT="15" ALIGN="BOTTOM" BORDER="0"
SRC="img61.gif"
ALT="$^{o}$">) as the
corners. We use <A NAME="tex2html358"
HREF="../grdimage.html"><I><B>grdimage</B></I></A><A NAME="10040"></A> to make the illustration:
<P>
<P>
<BR>
<P>
<BR CLEAR="ALL">
<HR>
<BR>
<PRE>
gmtset HEADER_FONT_SIZE 30 OBLIQUE_ANOTATION 0 DEGREE_FORMAT 0
makecpt -Crainbow -T-2/14/2 >! g.cpt
grdimage HI_geoid2.grd -R160/20/220/30r -JOc190/25.5/292/69/4.5i -E50 -K -P -B10 -Cg.cpt \
-U/-1.25i/-1i/"Example 2 in Cookbook" -X1.5i -Y1.25i >! example_02.ps
psscale -Cg.cpt -D5.1i/1.35i/2.88i/0.4i -O -K -L -B2:GEOID:/:m: -E >> example_02.ps
grd2cpt HI_topo2.grd -Crelief -Z >! t.cpt
grdgradient HI_topo2.grd -A0 -Nt -GHI_topo2_int.grd
grdimage HI_topo2.grd -IHI_topo2_int.grd -R -JO -E50 -B10:."H@#awaiian@# T@#opo and @#G@#eoid:" -O -K \
-Ct.cpt -Y4.5i >> example_02.ps
psscale -Ct.cpt -D5.1i/1.35i/2.88i/0.4i -O -K -I0.3 -B2:TOPO:/:km: >> example_02.ps
cat << EOF | pstext -R0/8.5/0/11 -Jx1i -O -N -Y-4.5i >> example_02.ps
-0.4 7.5 30 0.0 1 2 a)
-0.4 3.0 30 0.0 1 2 b)
EOF
\rm -f .gmtcommands HI_topo2_int.grd ?.cpt
</PRE>
<P>
<BR>
<BR>
<P>
<BR CLEAR="ALL">
<HR>
<P>
The first step extracts the 2-D data sets from the local
data base using <A NAME="tex2html359"
HREF="../grdraster.html"><I><B>grdraster</B></I></A><A NAME="10143"></A>, which is a supplemental
utility program (see Appendix A) that may be adapted to
reflect the nature of your data base format. It
automatically figures out the required extent of the region
given the two corners points and the projection. The extreme
meridians and parallels enclosing the oblique region is
<B>-R</B>159:50/220:10/3:10/47:35. This is
the area extracted by <A NAME="tex2html360"
HREF="../grdraster.html"><I><B>grdraster</B></I></A><A NAME="10153"></A>. For your convenience
we have commented out those lines and provided the two
extracted files so you do not need <A NAME="tex2html361"
HREF="../grdraster.html"><I><B>grdraster</B></I></A><A NAME="10162"></A> to try
this example. By using the embedded grdfile format
mechanism we saved the topography using kilometers as the
data unit. We now have two grdfiles with bathymetry and
geoid heights, respectively. We use <A NAME="tex2html362"
HREF="../makecpt.html"><I><B>makecpt</B></I></A><A NAME="10171"></A> to generate
a linear color palette file <U>geoid.cpt</U> for the geoid and use
<A NAME="tex2html363"
HREF="../grd2cpt.html"><I><B>grd2cpt</B></I></A><A NAME="10181"></A> to get a histogram-equalized cpt file <U>topo.cpt</U>
for the topography data. To emphasize the structures in
the data we calculate the slopes in the north-south direction
using <A NAME="tex2html364"
HREF="../grdgradient.html"><I><B>grdgradient</B></I></A><A NAME="10191"></A>; these will be used to modulate the
color image. Next we run <A NAME="tex2html365"
HREF="../grdimage.html"><I><B>grdimage</B></I></A><A NAME="10200"></A> to create a
color-code image of the Geosat geoid heights, and draw a
color scale to the right of the image with <A NAME="tex2html366"
HREF="../psscale.html"><I><B>psscale</B></I></A><A NAME="10209"></A>.
We also annotate the color scales with <A NAME="tex2html367"
HREF="../psscale.html"><I><B>psscale</B></I></A><A NAME="10218"></A>.
Similarly, we run <A NAME="tex2html368"
HREF="../grdimage.html"><I><B>grdimage</B></I></A><A NAME="10227"></A> but specify <B>-Y</B>4.5
to plot above the previous image. Adding scale and label
the two plots a) and b) completes the illustration
(Figure <A HREF="node75.html#fig:GMT_example_02">6.2</A>).
<A NAME="10118"></A>
<P></P>
<DIV ALIGN="CENTER"><A NAME="fig:GMT_example_02"></A><A NAME="10237"></A>
<TABLE>
<CAPTION ALIGN="BOTTOM"><STRONG>Figure 6.2:</STRONG>
Color images from gridded data</CAPTION>
<TR><TD><IMG
WIDTH="392" HEIGHT="520" BORDER="0"
SRC="img99.gif"
ALT="\begin{figure}\centering\epsfig{figure=eps/GMT_example_02.eps}\end{figure}"></TD></TR>
</TABLE>
</DIV><P></P>
<P>
<HR>
<!--Navigation Panel-->
<A NAME="tex2html2080"
HREF="node76.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.gif"></A>
<A NAME="tex2html2074"
HREF="node73.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.gif"></A>
<A NAME="tex2html2068"
HREF="node74.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.gif"></A>
<A NAME="tex2html2076"
HREF="node1.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.gif"></A>
<A NAME="tex2html2078"
HREF="node149.html">
<IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index.gif"></A>
<BR>
<B> Next:</B> <A NAME="tex2html2081"
HREF="node76.html">6.3 Spectral estimation and</A>
<B> Up:</B> <A NAME="tex2html2075"
HREF="node73.html">6. Cook-book</A>
<B> Previous:</B> <A NAME="tex2html2069"
HREF="node74.html">6.1 The making of</A>
  <B> <A NAME="tex2html2077"
HREF="node1.html">Contents</A></B>
  <B> <A NAME="tex2html2079"
HREF="node149.html">Index</A></B>
<!--End of Navigation Panel-->
<ADDRESS>
Paul Wessel
2001-04-18
</ADDRESS>
</BODY>
</HTML>
|