10.5.3 The automatic GMAP

There are two way to make maps with Google Earth or Google Maps from EEV automatic.

One way is to call GHYP in EEV, this will start Google Earth or Google Maps (in a browser) automaticly for each of the following events. Note, that Google Earth will reload every new event but Google Maps will open a new browser tab for every new event (tested in Chrome).

The other way is to enable the GMAP_AUTO parameter in SEISAN.DEF, this will enable a function in the HYP program, that makes a KML file that Google Earth can load automatically when e.g. an event is located in EEV. See describsion below.

Figure 10.8: Example of automatic mapping with gmap. Earthquake in West Greenland. Blue dot is the old location and the red dot is the current location. Green and yellow stations are stations with good and ok residuals, respectively.
\begin{figure}
\centerline{\includegraphics[width=0.9\linewidth]{fig/gmap-cur-kml}}
\end{figure}

Start EEV and locate an event. In the directory a new file gmap.cur.kml will appear, this file can be opened with Google Earth and it will show the location of the current event and the used stations and the raypaths.

The color of the stations is given by the travel time residual as green, yellow or red, for: residuals \bgroup\color{black}$<0.5s$\egroup, \bgroup\color{black}$0.5s=<$\egroupresidual \bgroup\color{black}$=<1,5s$\egroup or residual \bgroup\color{black}$>1.5s$\egroup, respectively.

To enable the automatic generation of Google Earth input files, add these parameters to your SEISAN.DEF file:


GMAP_AUTO      0: no, 1:yes             1.0
GMAP_AUTO_ICON_EVENT                    http://maps.google.com/mapfiles/kml/pal2/icon26.png
GMAP_AUTO_ICON_COLOR                    ff0000ff
GMAP_AUTO_ICON_MSIZE                    0.5
GMAP_AUTO_ICON_XSIZE                    0.2
GMAP_AUTO_ICON_YSIZE                    0.5
GMAP_AUTO_LOOKAT_ALTITUDE               2000000.0
GMAP_AUTO_SHOW_STAT  0: no, 1:yes       1.
GMAP_AUTO_ERROR_ELLIPSE  0: no, 1:yes   1.
GMAP_AUTO_ELLIPSE_COLOR                 ff00ff00
GMAP_AUTO_ELLIPSE_WIDTH                 12.43
GMAP_AUTO_STAT_SIZE                     1.1
GMAP_AUTO_STAT_URL                      http://maps.google.com/mapfiles/kml/shapes/triangle.png
GMAP_AUTO_STAT_RESIDAL_GOOD             0.5
GMAP_AUTO_STAT_RESIDUAL_BAD             1.5
GMAP_AUTO_STAT_COLOR_GOOD               ff00ff00
GMAP_AUTO_STAT_COLOR_OK                 ff00ffff
GMAP_AUTO_STAT_COLOR_BAD                ff0000ff
GMAP_AUTO_SHOW_OLD_LOCATION 0:no,1:yes  1.
GMAP_AUTO_OLD_LOCATION_COLOR            ffff0000
GMAP_AUTO_SHOW_PATH   0: no, 1:yes      1.
GMAP_AUTO_PATH_COLOR                    ff929292
GMAP_AUTO_PATH_WIDTH                    2.5
GMAP_AUTO_FILE_ACTION  0: no, 1:yes     0.
GMAP_AUTO_ACTION                        cp gmap.cur.kml /inetpub/www/html/seismo/nnsn

You can change the parameters to adjust the output file gmap.cur.kml for your system, see definition here 3.13.

Inorder to run the display in a realtime mode, you must have an other KML file that makes Google Earth reload the gmap.cur.kml file at short intervals. Such file could look like:


<?xml version='1.0' encoding='UTF-8'?>
<kml xmlns="http://www.opengis.net/kml/2.2">
	<Folder>
		<!-- Link to GMAP file on Computer: -->
		<NetworkLink>
			<name><B>SEISAN current event</B></name>
			<!-- To turn flyToView on/off use:1/0 -->
			<flyToView>0</flyToView>
			<Link>
				<href>C:/seismo/WOR/gmap.cur.kml</href>
				<refreshMode>onInterval</refreshMode>
				<refreshInterval>3</refreshInterval>
			</Link>
		</NetworkLink>
<!-- Example: Link to GMAP file on the Internet: 
		<NetworkLink>
			<name><B>DNK events NOV 2011</B></name>
			<Link>
				<href>http://seis.geus.net/quakes/dnk-2011-11.kml</href>
				<refreshMode>onInterval</refreshMode>
				<refreshInterval>3600</refreshInterval>
			</Link>
		</NetworkLink>
-->
	</Folder>
</kml>

In this example the gmap.cur.kml file is reloaded every 3 second from a local C:\seismo\WOR directory on a windows pc. And below is an other KML file is reloaded at 60min intervals from the Internet.

The above file is named gmap-automatic.kml and is found in the DAT directory.