From: Michael B. <mic...@gm...> - 2010-03-24 06:40:21
|
A bit of progress... Here is the countries shapefile with polygon fill interpolated from the population size attribute http://imagebin.org/90101 Style created like this... private Style createInterpolatedStyle() { Expression[] params = { // lookup value is population size ff.property("POP_CNTRY"), // interp points ff.literal(0), ff.literal("#0000ff"), ff.literal(1.0e+7), ff.literal("#00ff00"), ff.literal(1.0e+9), ff.literal("#ff0000"), // specify linear colour interpolation ff.literal("linear"), ff.literal("color") }; Function fn = ff.function("Interpolate", params); Fill fill = sf.createFill(fn); Stroke stroke = sf.createStroke(ff.literal("#000000"), ff.literal(1.0)); PolygonSymbolizer sym = sf.createPolygonSymbolizer(stroke, fill, null); return SLD.wrapSymbolizers(new Symbolizer[]{sym}); } Not a great palette but never mind. I'll upload a new patch this evening. Michael |