Book Image

Mastering Geoserver

By : Colin Henderson
Book Image

Mastering Geoserver

By: Colin Henderson

Overview of this book

Table of Contents (19 chapters)
Mastering GeoServer
About the Author
About the Reviewers

Using Freemarker templates to change WMS responses

Until now, the methods of controlling GeoServer output we have focused on have been concerned with the rendered output. We are going to change the track slightly now and take a look at how we can manipulate the response that GeoServer provides to WMS GetFeatureInfo requests.

A GetFeatureInfo request is a standard WMS request that returns the feature information for a given location on a map for one or more layers. In essence, it is the equivalent of a standard feature's information interrogation that one might do in a Desktop GIS. GeoServer receives the request and then calculates if any features of the given layer, or layers, intersect the location specified.

If any features are hit, then they are included in the response to the request. The format of this response is dependent on the value specified for the INFO_FORMAT request parameter. GeoServer has a number of formats that can be output, but in each case, the generated output is fixed...