Thanks Ian, that's of great help. !

So far, I crafted a categorized style this way:

================================================

    Graphic graphic = sf.getDefaultGraphic();
    Mark mark = sf.getCircleMark();

    List<Expression> categories = new ArrayList<>();
    categories.add(ff.property("value"));

    for (int i = 0; i < colors.length; ++i) {
        categories.add(ff.literal(thresholds[i]));

categories.add(ff.literal(FormatUtils.colorToHashedHexs(colors[i])));
    }

        Function ctgFun = new CategorizeFunction(categories,
ff.literal("#0000FF")); // FIXME remove fallback
        mark.setFill(sf.createFill(ctgFun, ff.literal(fillOpacity)));
//        mark.setStroke(sf.createStroke(
//                ff.literal(color), ff.literal(strokeOpacity)));
        graphic.graphicalSymbols().clear();
        graphic.graphicalSymbols().add(mark);

        PointSymbolizer ps = sf.createPointSymbolizer(graphic,
GEOM_PROPERTY);
​================================================​


On 2 May 2016 at 12:52, Ian Turton <[email protected]> wrote:

> What you want can probably be achieved by using a categorize function -
> see
> http://docs.geoserver.org/latest/en/user/styling/sld-tipstricks/transformation-func.html
> for more details of how it works.
>
> Ian
>
------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
GeoTools-GT2-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to