Geoserver KML

From Seamonster

Jump to: navigation, search

Contents

Overview

We're going to be using Geoserver to generate KML.

Links

Geoserver documentation for KML is available here:

http://docs.codehaus.org/display/GEOSDOC/Google+Earth

Process

Features

In order to generate KML we need geospatial data in the form of an ESRI Shapefile or a PostGIS database. For the most part we will be working with vector data, which takes the form of a point, line or polygon. These vectors are referred to as features.

Each feature has some attribute data associated with them. In GIS each feature could be considered as a record in a database. Each feature can have multiple attributes associated with it, somewhat analagous to the different columns associated with a record in a database.

Feature Templates

By default the attributes are displayed as an HTML table. However they can be accessed using a template. We can also change the colors and shapes of the icons depending on the attribute data.

Here is the link to create templates:

http://docs.codehaus.org/display/GEOSDOC/01-Placemark+Templates

From this example we could place the html referenceing the sparklines into an attribute and then create a simple template that displays only that attribute.

Feature Style

Here is a link for styling features in KML using Geoserver:

http://docs.codehaus.org/display/GEOSDOC/02+Google+Earth+KML+Styling+Guide