1REM		GMT EXAMPLE 17
2REM
3REM Purpose:	Illustrates clipping of images using coastlines
4REM GMT modules:	grd2cpt, grdimage, coast, text, makecpt
5REM DOS calls:	del
6REM
7gmt begin ex17
8	REM First generate geoid image w/ shading
9	gmt grd2cpt @india_geoid.nc -Crainbow -H > geoid.cpt
10	gmt grdimage @india_geoid.nc -I+d -JM16c -Cgeoid.cpt
11
12	REM Then use gmt coast to initiate clip path for land
13	gmt coast -R@india_geoid.nc -Dl -Gc
14
15	REM Now generate topography image w/shading
16	gmt makecpt -C150 -T-10000,10000 -N
17	gmt grdimage @india_topo.nc -I+d
18
19	REM Finally undo clipping and overlay basemap
20	gmt coast -Q -B+t"Clipping of Images" -Ba10f5
21
22	REM Put a colorbar on top of the land mask
23	gmt colorbar -DjTR+o0.8c/0.2c+w10c/0.5c+h -Cgeoid.cpt -Bx5f1 -By+lm -I
24
25	REM Add a text paragraph
26	echo ^> 90 -10 12p 8c j > tmp.txt
27	echo @_@%%5%%Example 17.@%%%%@_  We first plot the color geoid image >> tmp.txt
28	echo for the entire region, followed by a gray-shaded @REMetopo5@REM >> tmp.txt
29	echo image that is clipped so it is only visible inside the coastlines. >> tmp.txt
30	gmt text tmp.txt -M -Gwhite -Wthinner -C+tO -D8p -F+f12,Times-Roman+jRB
31
32	REM Clean up
33	del geoid.cpt tmp.txt
34gmt end show
35