GeoServer : GSIP 18 - Output Format Cleanup
This page last changed on Jul 17, 2008 by jdeolive.
A cleanup of the Output Format apis in GeoServer.
The output format api is one the most implemented and important extension points in GeoServer. Currently there are a number of issues with it.
Both WFS and WMS provide a way to plug-in output formats for GetMap,GetFeatureInfo,GetFeature, and DescribeFeatureType operations. There are a number of formats which apply to both services. Examples include KML, SVG, and OpenLayers to name a few. Currently there is no easy way to apply a single format to both services.
All the output format code is "baked" into the wms and wfs modules. Separating out each format into its own module would have benefits. The most notable being the ability to release them as separate release artifacts. Often it is the case that a full release must be done just to release a small change to a particular output format.
In GeoServer 1.5 a new dispatch system was introduced. The dispatcher treats an output format as a regular Response instance. This forces an output format to extend Response, which has certain limitations, and is confusing.
This proposal involves two major steps:
The following class diagram summarizes the current state of the output format apis in GeoServer:
The following class diagram summarizes the newly proposed output format api:
The base interface for all output formats. Contains methods for getting at all the metadata for a single output format.
An output format for features or vector data. This output format is used in GetFeature, and GetFeatureInfo operations. It could possibly be used by GetMap as well, although MapOutputFormat is more applicable.
An output format for a full map context, handling both vector and raster data, and the associated styling information. This format is used by the GetMap operation.
An output format for schemas or feature types. It is used by the DescribeFeatureType operation.
Implementing these interfaces is similar to implementing the interfaces as they live in GeoServer today. The interesting part is for output format that wish to support both Feature and Map output. For instance, consider KML:
The upshot and benefit of this is that an output format can implement both interfaces, while keeping all the code in a single class.
|Document generated by Confluence on May 14, 2014 23:00|