Why share GIS data as KML?

Why share GIS data as KML?

Keyhole Markup Language (KML) is a format that encapsulates geometry, symbology, descriptions, attributes, imagery, and behavior into a single source. KML gives ArcGIS Desktop users the opportunity to share their layers and maps with other users, many of whom may not be GIS professionals, by bundling all the elements of displayed GIS data into a single, easy-to-share source.

Additionally, KML leverages HTML for the presentation of element attributes, which allows enormous flexibility in the authoring process. For example, charts, pictures and tables can all be included as feature content. HTML also supports the incorporation of value-added behavior to the features, such as linking to Web content or sending parameter-based requests to online services.

KML can be displayed in many applications, including Google Earth, Google Maps, ArcGlobe, and ArcGIS Explorer.

Common use cases for sharing GIS data as KML

There are three primary use cases for ArcGIS Desktop users creating KML.

  1. Sharing existing GIS data as KML

    For example, the posting of the latest earthquake data from the USGS. ArcGIS Desktop users, through ArcMap, ArcGlobe, and ArcScene, have an excellent authoring platform for KML. To create KML from GIS data, the primary display characteristics—geometry, symbology, and the HTML presentation of attributes—must be defined for the data being shared. The geometry for GIS features is embedded in the Shape field of the source data. Feature geometry is created and maintained using the spatial editing functionality of ArcMap. While GIS data can be in any spatial reference system, such as a meter-based UTM zone, when the data is shared as KML, it will be reprojected into geographic coordinates. The symbology for GIS features and imagery is defined when the source data is displayed as a layer in ArcMap, ArcGlobe, or ArcScene. Default symbology is assigned when the data is added, which the user can then update. Given that KML symbology is a subset of the symbology options available in ArcGIS, complex options such as multilayer symbols are not recommended. The HTML presentation for features within a layer can be configured on the HTML tab of the Layer Properties dialog box. Here, the user can specify whether feature attributes will be displayed as a simple table of field names and values or whether a more advanced display should be used. The HTML Popup tool can be used to preview how the content will be displayed in KML. Learn more about authoring existing GIS data as KML.

  2. Providing a geographic context for HTML content

    For example, the georeferencing of newspaper articles. Sometimes, it is the HTML content that is the primary source of information, and the geometry is simply a geographic context. In these cases, the focus is not on the GIS, but rather on the information stored within the HTML. Incorporating a location with an HTML page allows access to the content based on its position on a virtual globe. It also allows a visual representation of the spatial relationship between this content and other spatially enabled content. To georeference HTML, there need to be some properties within the HTML that can be converted to a location. For example, newspaper articles usually include a city name that can be easily geocoded into a position on the planet. Once there is a set of located features, the applicable HTML content for each location can be either stored directly in the geodatabase or referenced via a URL. The advantage of the first option is the encapsulation of all the applicable data into the geodatabase, thereby negating the reliance on an Internet connection. The advantage of the second option is the ability to update the HTML content separately from the location information. In either case, the layer's HTML presentation is configured on the HTML Popup tab of the Layer Properties dialog box, and the HTML Popup tool can be used to preview how the content will be displayed in KML. Learn more about providing a GIS context to HTML content.

  3. Creating new features explicitly as KML

    For example, quickly sketching a proposed development site to share with others. Users can dynamically create KML elements by sketching features on top of existing geographic data using the KML-enabled ArcSketch extension. ArcSketch allows preauthoring of layer symbology, providing a palette of symbols that users can choose from as they sketch the geometry of new features onto the map. By combining the quick symbolized editing of GIS features through ArcSketch with the layer property settings for HTML pop-ups, GIS data can be created to be ready for sharing as KML in a very efficient manner. At the completion of the ArcSketch edit session, a KML file containing the geometry, symbology, and HTML content for the edited features will be automatically generated. Learn more about using ArcSketch to create new features as KML.

Creating the KML

ArcGIS Desktop users can easily create KML files from their authored layers and maps by running one of the KML export geoprocessing functions available from the Conversion toolset in the Toolbox window. These tools allow export of a single layer to KML or the export of an entire map to KML.

A KML file created from ArcGIS Desktop will be a snapshot of the current GIS data. If the GIS data is updated regularly, then the KML file will also need to be updated accordingly.

When KML files contain image data—either native raster data or vector data displayed as raster—then a downsampled image is exported for inclusion in the KMZ (zipped KML) file. As this image is contained within the KMZ, it will not crisp up into a higher-resolution image as the user zooms in on the content.

To provide dynamic content or image data as KML, you will need to create KML network links using ArcGIS Server. This will provide mechanisms for serving dynamic data and varying image resolutions based on the viewing distance.

The very same layers and maps used to generate a KML file can be used to create the KML network link services. ArcGIS Server users employ the Manager application to publish a KML service.

Learn more about enabling map services as KML using ArcGIS Server

Sharing the KML

Once created, KML files can be sent directly to others, or they can be hosted on a Web page. By making the KML publicly available on a Web page, search engines, such as Google's, can mine the information from the file and return hits to your content based on an Internet search.

For KML network links published through ArcGIS Server, the service is exposed as both the network link connection information and as an encapsulated KML file containing the network link. Most consumers of KML, including Google Earth, ArcGlobe, and ArcGIS Explorer, support either forms of connection information.


1/21/2011