Importing focal mechanism models into Google Earth

Geophysical beach balls may be viewed in Google Earth using two methods:

Figure 5. Model location interface

Model location interface

Google Earth interface for adding solid models. The Link field contains the model Collada (.dae) file. Latitude, longitude, and altitude may be specified at import time.


(i) Adding a model directly into Google Earth at run time. As Google Earth is running, a model may be imported using the “Add...model” menu option (Figure 5). The model will first appear at the current geographic location, but its latitude, longitude, and altitude may be edited (see next section).

Figure 6. Default focal mechanism model

Default focal mechanism model

Default position and orientation of the black and white beach ball model. This is generated by the KML code in Table 2.


(ii) Creating and later opening a KML document. The code from Table 2 may be typed into a plain text file using any text editor. The document must be saved with file type “.kml”, e.g., “MyTestFile.kml.” Opening this document with Google Earth reveals the model. If the beach ball models have been downloaded and saved locally in a folder called “models” at the same level as the KML file, then the link text may be shortened to: <href> models/ BB_Black.dae </href>. However, in the author’s experience, broken file refs in Google Earth are best avoided by linking only to http URLs.


                Table 2: Sample KML File for Accessing a Solid Model

       <?xml version='1.0' encoding='UTF-8'?>
        <kml xmlns='http://earth.google.com/kml/2.1'>
                <Placemark>
                        <Model>
                                <Link>
                                        <href>http://users.wpi.edu/~declan/models/BB_Black.dae</href>
                                </Link>
                        </Model>
                </Placemark>
        </kml>

The 10-line KML file in Table 2 constitutes a complete, working document and is easily understood and adapted to the end user’s needs (Numerous textbooks and web sites offering XML tutorials are available, e.g., www.w3schools.com. The first line of code identifies the markup language as a version of XML. The XML file structure is based on individual tags identified by angle brackets, case-sensitive text, and pairs of opening and closing tags (the latter identified by the addition of a forward slash). Nested with these tags are the instructions that the reading program uses to render data.

The default location of the model is at zero latitude, zero longitude, and zero altitude (i.e., sea level in the southern Atlantic Ocean west of central Africa). Only the upper hemisphere is visible in Figure 6. The default orientation of the beach ball represents a purely strike slip double couple motion on a vertical fault plane (either sinistral on a NS-striking fault plane or dextral on an EW-striking fault plane). These defaults are changed by writing KML tags as explained below.