Skip to content

GSIP 125b

Jody Garnett edited this page Jul 12, 2017 · 1 revision

GSIP 125b - KML Usability Improvements

Overview

Proposed By

Jonathan Meyer

Assigned to Release

This proposal is for the next major release of GeoServer (2.7).

State

  • Under Discussion
  • In Progress
  • Completed
  • Rejected
  • Deferred

Motivation

Need for improved title and description exposed within KML output. Need ability to control automatic refresh interval and initial layer state (visible/inactive) of KML output.

Proposal Overview

Presently GeoServer names layers within output KML as "workspace:layername". This proposal suggests that instead KML layers would be named based on the specified layer title and include a layer description matching that of the abstract.

  1. Improve usability of generated KML by passing through the layer Title and Abstract specified within layer configuration as the KML NetworkLink name and description elements.
  2. Allow more control of generated KML by adding additional format_options parameter keys for setting auto refresh intervals and initial layer state. We are proposing "kmlrefresh" and "kmlvisible" as the new parameter keys.

Layer Naming

Presently GeoServer sets NetworkLink name elements within output KML with the form "workspace:layername". We propose that instead KML Network Link's name element would match the source layer's Title and description element matching that of the source layer's Asbstract. This would allow more end-user friendly rendering within Google Earth.

kmlrefresh format_options key

KML provides elements that allow automatic refresh of network links based on either a time interval specified in the KML or specified in response headers. This new format_options key would allow either a specific second interval for refresh to be specified or when the "expires" value is set to rely on headers. Using "expires" would allow individual layers in a KML generated with multiple layers to have different refresh intervals specified in layer configuration per layer. These expiration timeouts can be set under the Layer configuration Publishing tab in Cache Time field.

Take the following format_options value:

format_options=kmlrefresh:60

This will render the following within Url child elements of all NetworkLinks output by KML service:

... onInterval 60.0 ...

Take the use of the "expires" keyword:

format_options=kmlrefresh:expires

This will render the following within Url child elements of all NetworkLinks output by KML service:

...
<refreshMode>onExpire</refreshMode>
<refreshInterval>0.0</refreshInterval>
...

kmlvisible format_options key

By default, all NetworkLinks in generated KML are enabled. We've found it desirable when enabling many or data dense layer to be able to alter this behavior. This new format_options key allows true or false to be passed in which will set the desired initial state of layers. The default initial state when key is not specified remains visible.

To set all NetworkLinks to disabled initially:

format_options=kmlvisible:false

The visibility child element of NetworkLinks within generated KML will now be set to 0.

Feedback

See link to forum post on geoserver-devel below.

Backwards Compatibility

No breaking changes are made to existing KML capabilities. If title or abstract are not specified fall-back is made to using "workspace:layername" as the NetworkLink displayed name. Unit tests have been added and updated to encompass the changes.

Voting

Project Steering Committee:

  • Alessio Fabiani
  • Andrea Aime
  • Ben Caradoc-Davies
  • Christian Mueller
  • Gabriel Roldán
  • Jody Garnett
  • Jukka Rahkonen
  • Justin Deoliveira
  • Phil Scadden
  • Simone Giannecchini

Committers:

  • Jonathan Meyer

Links

Clone this wiki locally