}
void colorBrewerExample(SimpleFeatureCollection featureCollection) {
// colorBrewerExample start
// STEP 0 Set up Color Brewer
ColorBrewer brewer = ColorBrewer.instance();
// STEP 1 - call a classifier function to summarise your content
FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2();
PropertyName propteryExpression = ff.property("height");
// classify into five categories
Function classify = ff.function("Quantile", propteryExpression, ff.literal(5));
Classifier groups = (Classifier) classify.evaluate(featureCollection);
// STEP 2 - look up a predefined palette from color brewer
String paletteName = "GrBu";
Color[] colors = brewer.getPalette(paletteName).getColors(5);
// STEP 3 - ask StyleGenerator to make a set of rules for the Classifier
// assigning features the correct color based on height
FeatureTypeStyle style = StyleGenerator.createFeatureTypeStyle(
groups,