Skip to content

GSIP 191

Nuno Oliveira edited this page May 21, 2020 · 10 revisions

GSIP 191 - New extension point in WMS rendering to enrich style symbolizers

Overview

This is a proposal for adding a new extension point to enrich and process style symbolizers in Geoserver WMS rendering.

Proposed By

  • Fernando Miño
  • Nuno Oliveira

Assigned to Release

This proposal is for:

  • Geoserver 2.18 RC
  • Geoserver 2.17.2

State

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

Motivation

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.

Proposal

A Java interface named SymbolizersPreProcessor will be available in Geotools via a new proposal and PR. The modules implementing SymbolizersPreProcessor interface will register the extension points in GeoServer Spring application context (via the applicationContext xml file).

On rendering stage, GeoServer will fetch all the registered Java beans implementing SymbolizersPreProcessor 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 after every code point where the StreamingRenderer Geotools class is instanced on GeoServer WMS, thus on classes:

  • RenderedImageMapOutputFormat
  • IconRenderer
  • PDFMapResponse
  • SVGBatikMapOutputFormat

For adding the registered SymbolizersPreProcessor extensions list to the StreamingRenderer instance, the StreamingRenderer::addSymbolizersPreProcessors method will be used. Internally this will make StreamingRenderer process the feature and symbolizers on extension instances found (if any) and return to the rendering logic the resulting symbolizers list. Only the extensions whose SymbolizersPreProcessor::appliesTo method returns true to the involved layers will be registered in the current StreamingRenderer instance.

Backwards Compatibility

This new enhancement is planned with backward compatibility in mind: when no callbacks are registered the execution chain will remain the same.

Feedback

Voting

Project Steering Committee:

  • Alessio Fabiani:
  • Andrea Aime:
  • Ian Turton:
  • Jody Garnett: -1, expect geotools proposal needed to define callback
  • Jukka Rahkonen:
  • Kevin Smith:
  • Simone Giannecchini:
  • Torben Barsballe:
  • Nuno Oliveira:

Links

Clone this wiki locally