-
Notifications
You must be signed in to change notification settings - Fork 7
GSIP 191
This is a proposal for adding a new extension point to enrich and process style symbolizers in Geoserver WMS rendering.
- Fernando Miño
- Nuno Oliveira
This proposal is for:
- Geoserver 2.17-RC
- GeoServer 2.16.3
- Under Discussion
- In Progress
- Completed
- Rejected
- Deferred
This is a proposal for adding an extension point for processing and enriching style symbolizers in base to the feature being rendered. In this manner now it will be possible to dinamically build and modify symbolizers in base to the feature data in GeoServer rendering stage by any module using the extension point.
A Java interface named SymbolizersCallback
will be added to GeoServer WMS module, on org.geoserver.wms
package with the following signature:
interface SymbolizersCallback {
/** Can modify the list of symbolizers to be painted */
List<Symbolizer> apply(Feature feature, List<Symbolizer> symbolizers);
}
The modules implementing SymbolizersCallback interface will register the extension point in GeoServer Spring application context (via the applicationContext xml file).
On rendering stage, GeoServer will fetch all the registered Java beans implementing SymbolizersCallback interface using the extensions API, and will execute them providing the current Feature and list of symbolizers to be rendered. This process will be executed before the features/symbolizers are drawn.
To achieve this, this extension point mechanism will be executed before every code point where the StreamingRenderer
Geotools class is instanced on GeoServer WMS, thus on classes:
- RenderedImageMapOutputFormat
- IconRenderer
- PDFMapResponse
- SVGBatikMapOutputFormat
- CRSAreaOfValidityMapBuilder
For intercepting the about to render feature and Symbolizers list, the StreamingRenderer.processSymbolizers
method will be extended, process the feature and symbolizers on callbacks found (if any) and return to the default execution method chain (the super method) with the resulting feature/symbolizers. Currently this method is private so we will need to change it to protected or add a new protected method intercepting the feature/symbolizers values before continuing with the render process.
This new enhancement is planned with backward compatibility in mind: when no callbacks are registered the execution chain will remain the same.
Project Steering Committee:
- Alessio Fabiani:
- Andrea Aime:
- Ian Turton:
- Jody Garnett:
- Jukka Rahkonen:
- Kevin Smith:
- Simone Giannecchini:
- Torben Barsballe:
- Nuno Oliveira: