This page last changed on Nov 27, 2009 by afabiani.

This page describes the new GeoServer 2.0 module SLD Service.
The module is candidate to be merged on restconfig extension. It contains a set of utilities allowing users to interact with special sld atuomatic creation on the fly.
Actually the service contains three operations:

  • LayerAttributes (READ ONLY) : allows to retrieve the list of the Attributes for a vectorial layer in HTML, XML and JSON formats.
  • Classifier (READ ONLY) : This option allow to easily create new sld styles based on classifications over existing data (thematic mapping). It creates a set of sld rules on the fly for vectorial layers applying a classification (quantile, equalInterval, uniqueInterval) and a colorRamp to the specified layer attribute values. Results are returned back in HTML, XML and JSON formats.
  • Rasterizer (READ ONLY) : allows to rescale on the fly the ColorMap of the default RasterSymbolizer for a raster layer. The new SLD is returned back as SLD. The remapped style is not saved on the catalog anyway.

New features will be added in the future.

URL GET DELETE PUT POST
/rest/sldservice/{layer}/attributes list of attributes as couples of name and type (html,xml,json)     The same as for GET operation
/rest/sldservice/{layer}/classify creates a classification based on data on the fly (html,xml,json)     The same as for GET operation
/rest/sldservice/{layer}/rasterize creates a classification based on data on the fly (html,xml,json)     The same as for GET operation

The /rest/sldservice/{layer}/classify post request uses the following parameters:

  • method: "unique", "quantile", "equalInterval" (default)
  • attribute: the property name used for classfication
  • intervals: the number of classes (default == 2)
  • open: specifies if must consider the intervals closed or not (default == false)
  • ramp: may be "random", "red", "blue", "custom"
    • startColor: custom ramp start color (0xRRGGBB)
    • endColor: custom ramp end color (0xRRGGBB)
    • midColor (optional): custom ramp mid color (0xRRGGBB)

The /rest/sldservice/{layer}/rasterize post request uses the following parameters:

  • min: minimum value (default == 0.0)
  • max: maximum value (default == 100.0)
  • classes: the number of classes (default == 100)
  • ramp: may be "random", "red", "blue", "custom" (default == 'red')
    • startColor: custom ramp start color (0xRRGGBB)
    • endColor: custom ramp end color (0xRRGGBB)
    • midColor (optional): custom ramp mid color (0xRRGGBB)
Document generated by Confluence on May 14, 2014 23:00