KML is the Keyhole Markup Language--items are tagged just like in HTML.
KMZ is a compressed (.zip) kml plus any images.
You can view KMLs in GoogleMaps by simply pointing at the URL from the map search box: Lat Long Blog
KML Introduction - Importing Points to Google Earth
A Placemark is one of the most commonly used features in Google Earth. It marks a position on the Earth's surface, using a yellow pushpin as the icon. For our example, we will use the Yellowstone Earthquake data with which we worked so much at the beginning of the semester. Here is the Yellowstone Earthquake file.
The structure of this file breaks down as follows:
An XML header. This is line 1 in every KML file. No spaces or other characters can appear before this line.
A KML namespace declaration. This is line 2 in every KML 2.2 file.
A Placemark object that contains the following elements:
A name that is used as the label for the Placemark
A description that appears in the "balloon" attached to the Placemark
A Point that specifies the position of the Placemark on the Earth's surface (longitude, latitude, and optional altitude)
Basically it is the same as above, we just repeat the placemark tag, changing the location and attributes:
<name> 3.4 </name>
<description> <![CDATA[<h1>Yellowstone EQs</h1><p><font color="red">Year = 1973.00 Depth = 10.00 Mag = 3.40.</font></p>]]></description>
Another feature you may want to test drive in Google Earth is the ground overlays.
These are images (in BMP, GIF, TIFF, TGA, and PNG formats) can be "draped" over the landscape.
We will again use the Yellowstone Earthquake data to demonstrate how some of our images we have made can be imported into Google Earth.
Remember our color image of mean earthquake depth:
The first thing we need to think about is "how do we georeference our image".
We will need to define the EXACT bounding box for the image.
To make this easier, I will constrain my figure to the borders of my axis.
New tags for overlays that were not in the last section.
A GroundOverlay object contains the following new elements:
An Icon contains href which links the image for the overlay.
A LatLonBox specifies where the top, bottom, right, and left sides of a bounding box for the ground overlay are aligned.
Turn on the earthquakes to fill out our points and overlay
ArcGIS 9.3 includes export and conversion to KML. You can find the functionality under ArcToolBox->Conversion Tools->To KML->Map to KML:
This tool converts a map file (MXD file) to a kmz. The scale setting tells it to show the image at that scale and larger (i.e., more zoomed in). Making a single composite image collapses layers in the MXD file to a single image in the KML file.