#include "common_options.txt"
.TH IMG2GOOGLE 1 MANDATE GMT_STRING "Generic Mapping Tools [img supplement]"
.SH NAME
img2google \- Create Google Earth KML overlay tiles from bathymetry Mercator img grid 
.SH SYNOPSIS
BD(img2google) GMT_Rgeo_OPT [ IT(imgfile) ] [ OPT(A)IT(mode)[IT(altitude)] ] [ OPT(C) ] 
[ OPT(F)IT(fademin/fademax) ] [ OPT(G)IT(prefix) ] [ OPT(L)IT(LODmin/LODmax) ] [ OPT(N)IT(layername) ] 
[ OPT(T)IT(doctitle) ] [ OPT(U)IT(URL) ] [ GMT_V_OPT ] [ OPT(Z) ]
.SH DESCRIPTION
BD(img2google) reads a 1x1 minute Mercator surface relief img file and creates a
Google Earth overlay KML file and associated PNG tile for the specified region.  If no input file is given we
use topo.11.1.img.
#include "explain_commonitems.txt"
.SH REQUIRED ARGUMENTS
#include "explain_-Rgeo.txt"
.SH OPTIONAL ARGUMENTS
.TP
IT(imgfile)
An img format bathymetry/topography file such as those created by Sandwell and Smith.  If this
files does not exist in the current directory and the user has set the environment variable 
BD($GMT_DATADIR), then BD(img2mercgrd) will try to find IT(imgfile) in BD($GMT_DATADIR).
.TP
OPT(A)IT(mode)[IT(altitude)]
Selects one of 5 altitude modes recognized by Google Earth that determines the altitude (in m) of the
image: BD(G) clamped to the ground, BD(g) append altitude relative to ground, BD(a) append absolute
altitude, BD(s) append altitude relative to seafloor, and BD(S) clamp it to the seafloor [Default].
.TP
OPT(C)
Turn on clipping so that only portions below sea level will be visible in the image [no clipping].
.TP
OPT(F)IT(fademin/fademax)
Sets the distance over which the geometry fades, from fully opaque to fully transparent. These ramp values,
expressed in screen pixels, are applied at the minimum and maximum end of the LOD (visibility) limits, respectively.
[no fading (0/0)].
.TP
OPT(G)IT(prefix)
Specify the prefix for the output image file (the extensions are set automatically). Default uses
the naming topoN|SIT(<north>)E|W<IT(west)>.
.TP
OPT(L)IT(LODmin/LODmax)
Measurement in screen pixels that represents the minimum limit of the visibility range for a given Region
Google Earth calculates the size of the Region when projected onto screen space. Then it computes the square
root of the Region's area (if, for example, the Region is square and the viewpoint is directly above the Region,
and the Region is not tilted, this measurement is equal to the width of the projected Region). If this
measurement falls within the limits defined by IT(LODmin) and IT(LODmax) (and if the region is in view),
the Region is active. If this limit is not reached, the associated geometry is considered to be too far from
the user's viewpoint to be drawn. IT(LODmax) represents the maximum limit of the visibility range for a given
Region. A value of −1, the default, indicates "active to infinite size." [always active].
.TP
OPT(N)IT(layername)
Append the layername of the image (use quotes if strings contain spaces) [topoN|SIT(<north>)E|W<IT(west)>].
.TP
OPT(T)IT(doctitle)
Append the document title (use quotes if strings contain spaces) ["Predicted bathymetry"].
.TP
OPT(U)IT(URL)
By default, images are referenced locally relative to the KML file.  Specify an URL to prepend a server address
to the image name reference [local].
#include "explain_-V.txt"
.TP
OPT(Z)
Uses zip (which must be installed) to create a *.kmz file for easy distribution; append BD(+)
to delete the KML and PNG file after zipping [No zipping].
#include "explain_help.txt"
.SH EXAMPLES
To create a 10x10 degree Google Earth KML tile for the region OPT(R)170/180/20/30 using the default
IT(topo.11.1.img) and output naming convention, try
.br
.sp
img2google -R170/180/20/30
.br
.sp
To make the same tile with the previous
IT(topo.10.1.img), run in verbose mode, clip so only oceanic areas are visible, name the output oldimage, 
specify the KML metadata directly (including setting the image altitude to 10 km), and make a single *.kmz file, try
.br
.sp
img2google topo.10.1.img -R170/180/20/30 -Aa10000 -C -Goldimage
-N"My KML title" -T"My KML title" -Uhttp://my.server.com/images -V -Z
.br
.sp
.SH DATA SETS
For topo.11.1.img and other Sandwell/Smith altimetry-derived Mercator grids, visit http://topex.ucsd.edu.
.SH "SEE ALSO"
.IR GMT (1),
.IR img2grd (1)
.IR img2mercgrd (1)
.IR ps2raster (1)
