A Quick Tour of KML: Geographic Visualization for the Web
After reading this chapter, you’ll be able to do the following:
- Give a simple definition of KML in layman’s terms.
- List four possible use cases for a KML presentation.
- Search for KML files on the web on a topic that interests you, and then view them with an Earth browser.
- Create a simple KML file and share it with your friends.
KML (Keyhole Markup Language) is an XML data format used to display information in a geographic context. Just as web browsers read and display HTML files, Earth browsers such as Google Earth read and display KML files. KML is a human-readable language composed of text and punctuation. It can be created and edited with a basic text editor, saved, and then viewed in an Earth browser. You don’t need to be a technical wizard to master the basics of KML, and you’ll find that this knowledge will enable you to create powerful presentations that paint your own geographic data and imagery over the global palette provided by many popular (and free) Earth browsers.
KML: An International Standard
As Michael T. Jones describes in his foreword to this book, KML was originally created in 2001 by a company called Keyhole as the data format for its Earth browser named Earth Viewer. Since that time, KML has evolved to its status as an international standard for presenting geographic information visually. Its official name is the OpenGIS KML 2.2 Encoding Standard (OGC KML), which is controlled by the Open Geospatial Consortium (www.opengeospatial.org/standards/kml/). At present, tens of millions of KML files are shared on the World Wide Web.
For consistency and simplicity, this book displays most KML examples using Google Earth, as shown in Figure 1-1. However, KML is now widely supported by a variety of applications, including Microsoft Virtual Earth, Microsoft WorldWide Telescope, NASA WorldWind, ESRI ArcGIS Explorer, Google Maps, Google Maps for mobile, Adobe PhotoShop, Autodesk AutoCAD, and Yahoo! Pipes. And the list of Earth browsers, mapping applications, and mobile devices that support KML is growing daily. Not all platforms support all features of KML 2.2, so be sure to test your work on the target system or software application if you have a special use in mind. There may be slight variations across browsers, but the KML basics are the same. KML is a 3D system: Length, width, and depth are the typical three dimensions in 3D, but in this context, it’s longitude, latitude, and altitude that form the three dimensions. However, 2D mapping applications such as Google Maps and Google Maps for mobile also support a subset of KML.
Figure 1-1 Share your experiences: your travels around town or around the world, places you’ve lived, photos you’ve taken. Blue icons indicate planned stops on a tour of Costa Rica. Balloons include travel tips and links to other trip resources. This file was originally created using Google’s My Maps, a collaborative 2D mapping application, and was then imported into Google Earth. (KML created by Pamela Fox.)