Generating a KML Time SeriesΒΆ

When spatial data is combined with temporal information the visualization effects can be very interesting. Showing how objects change spatially over time is a powerful animation commonly referred to as a time series. This section covers how to use GeoServer templates in conjunction with Google Earth support for time to create a time series.

  1. In the same directory that the title.ftl and description.ftl templates were created in the previous section, created a new template called time.ftl.

    ../_images/time1.png

    Creating a new time template

  2. Open time.ftl with a text editor and enter the following content:

    ${obs_datetime.value}
    

    Note

    Time templates work by obtaining a date from a temporal attribute.

    ../_images/time2.png

    Creating content for a time template.

  3. Save time.ftl, delete the storm-obs layer and follow this link:

    http://localhost:8083/geoserver/wms/kml?layers=geosolutions:storm_obs&mode=download
    

    Note

    This time we are using mode=download to have GE get the full data set, since we are going to see parts of it based on time as opposed to geographic area and importance

  4. A time slider should appear at the top of the view port.

    ../_images/time3.png

    Viewing temporal data in Google Earth

  5. Change the time interval in the time slider to about 1 month, and adjust the animation speed to be slow.

    ../_images/time4.png

    Adjusting time animation settings.

  6. Click OK and start the animation clicking on the clock button on the top.

    ../_images/time5.png

    Viewing the hurricane time series

At this point a temporal animation of the data set has been created with the simple use of templates. In the next section templates will be used yet again to add another aspect to the visualization.