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
|
<!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.17 Images clipped by coastlines</TITLE>
<META NAME="description" CONTENT="6.17 Images clipped by coastlines">
<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="node91.html">
<LINK REL="previous" HREF="node89.html">
<LINK REL="up" HREF="node73.html">
<LINK REL="next" HREF="node91.html">
</HEAD>
<BODY bgcolor="#ffffff">
<!--Navigation Panel-->
<A NAME="tex2html2290"
HREF="node91.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.gif"></A>
<A NAME="tex2html2284"
HREF="node73.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.gif"></A>
<A NAME="tex2html2278"
HREF="node89.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.gif"></A>
<A NAME="tex2html2286"
HREF="node1.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.gif"></A>
<A NAME="tex2html2288"
HREF="node149.html">
<IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index.gif"></A>
<BR>
<B> Next:</B> <A NAME="tex2html2291"
HREF="node91.html">6.18 Volumes and Spatial</A>
<B> Up:</B> <A NAME="tex2html2285"
HREF="node73.html">6. Cook-book</A>
<B> Previous:</B> <A NAME="tex2html2279"
HREF="node89.html">6.16 Gridding of data,</A>
  <B> <A NAME="tex2html2287"
HREF="node1.html">Contents</A></B>
  <B> <A NAME="tex2html2289"
HREF="node149.html">Index</A></B>
<BR>
<BR>
<!--End of Navigation Panel-->
<H1><A NAME="SECTION0014170000000000000000"></A>
<A NAME="11801"></A>
<BR>
6.17 Images clipped by coastlines
</H1>
<P>
This example demonstrates how <A NAME="tex2html458"
HREF="../pscoast.html"><I><B>pscoast</B></I></A><A NAME="11816"></A> can be used
to set up clippaths based on coastlines. This approach
is well suited when different gridded data sets are to be
merged on a plot using different color palette files.
Merging the files themselves may not be doable since they
may represent different data sets, as we show in this example.
Here, we lay down a color map of the geoid field near India
with <A NAME="tex2html459"
HREF="../grdimage.html"><I><B>grdimage</B></I></A><A NAME="11825"></A>, use <A NAME="tex2html460"
HREF="../pscoast.html"><I><B>pscoast</B></I></A><A NAME="11834"></A> to set up land
clippaths, and then overlay topography from the ETOPO5 data
set with another call to <A NAME="tex2html461"
HREF="../grdimage.html"><I><B>grdimage</B></I></A><A NAME="11843"></A>. We finally undo
the clippath with a second call to <A NAME="tex2html462"
HREF="../pscoast.html"><I><B>pscoast</B></I></A><A NAME="11852"></A> with the
option <B>-Q</B> (Figure <A HREF="node90.html#fig:GMT_example_17">6.17</A>):
<P>
<P>
<BR>
<P>
<BR CLEAR="ALL">
<HR>
<BR>
<PRE>
grd2cpt india_geoid.grd -Crainbow >! geoid.cpt
grdgradient india_geoid.grd -Nt1 -A45 -Gindia_geoid_i.grd
grdimage india_geoid.grd -Iindia_geoid_i.grd -JM6.5i -Cgeoid.cpt -P -K -U"Example 17 in Cookbook" \
>! example_17.ps
pscoast -R60/90/-10/25 -JM -O -K -Dl -Gc >> example_17.ps
echo "-10000 150 10000 150" >! gray.cpt
grdgradient india_topo.grd -Nt1 -A45 -Gindia_topo_i.grd
grdimage india_topo.grd -Iindia_topo_i.grd -JM -Cgray.cpt -O -K >> example_17.ps
pscoast -R -JM -O -K -Q -B10f5:."Clipping of Images": >> example_17.ps
pstext -R -JM -O -M -W255O0.5p -D-0.1i/0.1i << EOF >> example_17.ps
> 90 -10 12 0 4 RB 12p 3i j
@_@%5%Example 17.@%%@_ We first plot the color geoid image
for the entire region, followed by a gray-shaded @#etopo5@#
image that is clipped so it is only visible inside the coastlines.
EOF
\rm -f geoid.cpt gray.cpt *_i.grd .gmt*
</PRE>
<P>
<BR>
<BR>
<P>
<BR CLEAR="ALL">
<HR>
<P></P>
<DIV ALIGN="CENTER"><A NAME="fig:GMT_example_17"></A><A NAME="11908"></A>
<TABLE>
<CAPTION ALIGN="BOTTOM"><STRONG>Figure 6.17:</STRONG>
Clipping of images using coastlines</CAPTION>
<TR><TD><IMG
WIDTH="430" HEIGHT="538" BORDER="0"
SRC="img123.gif"
ALT="\begin{figure}\centering\epsfig{figure=eps/GMT_example_17.eps}\end{figure}"></TD></TR>
</TABLE>
</DIV><P></P>
<P>
<A NAME="11896"></A>
<P>
<HR>
<!--Navigation Panel-->
<A NAME="tex2html2290"
HREF="node91.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.gif"></A>
<A NAME="tex2html2284"
HREF="node73.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.gif"></A>
<A NAME="tex2html2278"
HREF="node89.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.gif"></A>
<A NAME="tex2html2286"
HREF="node1.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.gif"></A>
<A NAME="tex2html2288"
HREF="node149.html">
<IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index.gif"></A>
<BR>
<B> Next:</B> <A NAME="tex2html2291"
HREF="node91.html">6.18 Volumes and Spatial</A>
<B> Up:</B> <A NAME="tex2html2285"
HREF="node73.html">6. Cook-book</A>
<B> Previous:</B> <A NAME="tex2html2279"
HREF="node89.html">6.16 Gridding of data,</A>
  <B> <A NAME="tex2html2287"
HREF="node1.html">Contents</A></B>
  <B> <A NAME="tex2html2289"
HREF="node149.html">Index</A></B>
<!--End of Navigation Panel-->
<ADDRESS>
Paul Wessel
2001-04-18
</ADDRESS>
</BODY>
</HTML>
|