boundlessgeo/gxp — pull request #231 by mbertrand (2014-03-20 17:50:59+00:00)
Title: 'Classify' (Choropleth) tool for layer styles

Choropleth style generator for map layers. This depends on GeoServer's sldService community module (sldService-2.4-SNAPSHOT.jar, xom-1.1.jar need to be added to GeoServer's WEB-INF/lib directory).

When the WMSStylesDialog panel is brought up for a layer, an ajax call is made to see if the sldService module is installed, and displays a 'Classify' toolbar/button only if it receives a valid response. The ajax call requires a new url for GeoNode's proxy app ("gs/rest/sldservice").

Pressing the Classify button brings up a modified RulePanel, with classification options at the bottom (Attribute, Method, Classes, Color Ramp, Reverse Colors). The styles are generated when the Apply button at bottom is pressed.

Screenshots: http://imgur.com/a/IbswZ

This tool also depends on a patch to GeoTools/GeoServer which made it into trunk but may not be in the 2.4.x and earlier branches: http://jira.codehaus.org/browse/GEOS-6150, https://github.com/geotools/geotools/pull/324. Without this fix, the classifier will generate error tiles if it creates style rules for integer fields containing decimals (for example, a value range of 2.0 - 10.1)