Examples of addColorMapEntry()


Examples of org.geotools.styling.ColorMap.addColorMapEntry()

        // Adding transparent color entry before the min
        double start = min - (intervals ? 0 : 1E-2);
        ColorMapEntry entry = entries[0].getColorMapEntry(start);
        entry.setOpacity(filterFactory.literal(0));
        colorMap.addColorMapEntry(entry);

        if (intervals) {
            colorMap.setType(ColorMap.TYPE_INTERVALS);
            for (int i = 1; i < numEntries - 1; i += 2) {
                colorMap.addColorMapEntry(entries[i].getColorMapEntry(min, range));
View Full Code Here

Examples of org.geotools.styling.ColorMap.addColorMapEntry()

        colorMap.addColorMapEntry(entry);

        if (intervals) {
            colorMap.setType(ColorMap.TYPE_INTERVALS);
            for (int i = 1; i < numEntries - 1; i += 2) {
                colorMap.addColorMapEntry(entries[i].getColorMapEntry(min, range));
            }
        } else {
            colorMap.setType(ColorMap.TYPE_RAMP);
            for (int i = 0; i < numEntries - 1; i ++) {
                colorMap.addColorMapEntry(entries[i].getColorMapEntry(min, range));
View Full Code Here

Examples of org.geotools.styling.ColorMap.addColorMapEntry()

                colorMap.addColorMapEntry(entries[i].getColorMapEntry(min, range));
            }
        } else {
            colorMap.setType(ColorMap.TYPE_RAMP);
            for (int i = 0; i < numEntries - 1; i ++) {
                colorMap.addColorMapEntry(entries[i].getColorMapEntry(min, range));
            }
        }
        colorMap.addColorMapEntry(entries[numEntries - 1].getColorMapEntry(max));

        // Adding transparent color entry after the max
View Full Code Here

Examples of org.geotools.styling.ColorMap.addColorMapEntry()

            colorMap.setType(ColorMap.TYPE_RAMP);
            for (int i = 0; i < numEntries - 1; i ++) {
                colorMap.addColorMapEntry(entries[i].getColorMapEntry(min, range));
            }
        }
        colorMap.addColorMapEntry(entries[numEntries - 1].getColorMapEntry(max));

        // Adding transparent color entry after the max
        ColorMapEntry entryEnd = entries[numEntries - 1].getColorMapEntry(max + 1E-2);
        entryEnd.setOpacity(filterFactory.literal(0));
        colorMap.addColorMapEntry(entryEnd);
View Full Code Here

Examples of org.geotools.styling.ColorMap.addColorMapEntry()

        colorMap.addColorMapEntry(entries[numEntries - 1].getColorMapEntry(max));

        // Adding transparent color entry after the max
        ColorMapEntry entryEnd = entries[numEntries - 1].getColorMapEntry(max + 1E-2);
        entryEnd.setOpacity(filterFactory.literal(0));
        colorMap.addColorMapEntry(entryEnd);

        return colorMap;
    }

    private static FilterFactory filterFactory = new FilterFactoryImpl();
View Full Code Here

Examples of org.geotools.styling.ColorMap.addColorMapEntry()

        }
        ColorMap colorMap = sf.createColorMap();
        colorMap.setType(type);
        colorMap.setExtendedColors(extended);
        for (ColorMapEntry entry : entries) {
            colorMap.addColorMapEntry(entry);
        }
        if (parent == null) {
            reset();
        }
        return colorMap;
View Full Code Here

Examples of org.geotools.styling.ColorMap.addColorMapEntry()

        copy.setExtendedColors(colorMap.getExtendedColors());
        ColorMapEntry[] entries = colorMap.getColorMapEntries();
        if (entries != null) {
            for (int i = 0; i < entries.length; i++) {
                ColorMapEntry entry = entries[i];
                copy.addColorMapEntry(copy(entry));
            }
        }
        if (STRICT && !copy.equals(colorMap)) {
            throw new IllegalStateException("Was unable to duplicate provided ColorMap:" + colorMap);
        }
View Full Code Here

Examples of org.geotools.styling.ColorMap.addColorMapEntry()

    public Object parse(ElementInstance instance, Node node, Object value) throws Exception {

        ColorMap map = styleFactory.createColorMap();
       
        for (ColorMapEntry e : (List<ColorMapEntry>) node.getChildValues(ColorMapEntry.class)) {
            map.addColorMapEntry(e);
        }
       
        return map;
    }
View Full Code Here

Examples of org.geotools.styling.ColorMap.addColorMapEntry()

        int i = 0;
        while(!"Value".equals(children.get(i).getComponent().getName())) i++;
       
        ColorMapEntry entry = styleFactory.createColorMapEntry();
        entry.setColor((Expression)children.get(i++).getValue());
        map.addColorMapEntry(entry);
       
        while(i < children.size()) {
            entry = styleFactory.createColorMapEntry();
            entry.setQuantity((Expression)children.get(i).getValue());
            if (i+1 >= children.size()) {
View Full Code Here

Examples of org.geotools.styling.ColorMap.addColorMapEntry()

            if (i+1 >= children.size()) {
                throw new IllegalArgumentException("Incorrectly specified color map Threshold/Value pair");
            }
           
            entry.setColor((Expression)children.get(i+1).getValue());
            map.addColorMapEntry(entry);

            i+=2;
        }
       
        return map;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.