Examples of literalExpression()


Examples of org.geotools.styling.StyleBuilder.literalExpression()

                            fromColor.getBlue(), 255));
                    Expression toColorExpr = sB.colorExpression(new java.awt.Color(toColor.getRed(), toColor.getGreen(), toColor
                            .getBlue(), 255));
                    Expression fromExpr = sB.literalExpression(values[0]);
                    Expression toExpr = sB.literalExpression(values[1]);
                    Expression opacityExpr = sB.literalExpression(opacity);

                    ColorMapEntry entry = sf.createColorMapEntry();
                    entry.setQuantity(fromExpr);
                    entry.setColor(fromColorExpr);
                    entry.setOpacity(opacityExpr);
View Full Code Here

Examples of org.geotools.styling.StyleBuilder.literalExpression()

                rasterSym.setColorMap(colorMap);

                /*
                 * set global transparency for the map
                 */
                rasterSym.setOpacity(sB.literalExpression(colorRulesEditor.getAlphaVAlue() / 100.0));

                Style newStyle = SLD.wrapSymbolizers(rasterSym);
                Layer selLayer = getSelectedLayer();
                newStyle.setName(selLayer.getName());

View Full Code Here

Examples of org.geotools.styling.StyleBuilder.literalExpression()

            StyleBuilder sb = new StyleBuilder();
            if (value instanceof RGB) {
                RGB rgb = (RGB) value;
                newColor = new Color(rgb.red, rgb.green, rgb.blue);
                String htmlColor = SLDs.toHTMLColor(newColor);
                newColorExpr = sb.literalExpression(htmlColor);
            }
            if (data instanceof Rule) {
                Rule rule = (Rule) data;
                Symbolizer[] symb = rule.getSymbolizers();
                if (symb.length == 1) { //we're only expecting 1
View Full Code Here

Examples of org.geotools.styling.StyleBuilder.literalExpression()

                        if (rule.getName().toLowerCase().startsWith("rule")) { //$NON-NLS-1$
                            expectedIndex = Integer.parseInt(rule.getName().substring(4))-1;
                        }
                        int actualIndex = -1;
                        for (int i = 0; i < colors.length; i++) {
                            if (sb.literalExpression(SLDs.toHTMLColor(colors[i])).equals(oldColorExpr)) {
                                actualIndex = i;
                                if (expectedIndex == i) {
                                    //we found the correct old color where we expected to
                                    break;
                                } //otherwise, keep looking just in case
View Full Code Here

Examples of org.geotools.styling.StyleBuilder.literalExpression()

    chTypeGray.setContrastEnhancement(cntEnh);
   
    chSel.setGrayChannel(chTypeGray);

    rsb_1.setChannelSelection(chSel);
    rsb_1.setOpacity(sldBuilder.literalExpression(1.0));
   
    rsb_1.setOverlap(sldBuilder.literalExpression("AVERAGE"));
   
    final ColorMap cm = sldBuilder.createColorMap(
        new String[] { // labels
View Full Code Here

Examples of org.geotools.styling.StyleBuilder.literalExpression()

    chSel.setGrayChannel(chTypeGray);

    rsb_1.setChannelSelection(chSel);
    rsb_1.setOpacity(sldBuilder.literalExpression(1.0));
   
    rsb_1.setOverlap(sldBuilder.literalExpression("AVERAGE"));
   
    final ColorMap cm = sldBuilder.createColorMap(
        new String[] { // labels
          "category",
          "category",
View Full Code Here

Examples of org.geotools.styling.StyleBuilder.literalExpression()

    chTypeGreen.setChannelName("3");
   
    chSel.setRGBChannels(chTypeRed, chTypeBlue, chTypeGreen);

    rsb_1.setChannelSelection(chSel);
    rsb_1.setOpacity(sldBuilder.literalExpression(1.0));
    rsb_1.setContrastEnhancement(cntEnh);
    rsb_1.setOverlap(sldBuilder.literalExpression("AVERAGE"));
   
    // visit the RasterSymbolizer
    rsh.visit(rsb_1);
View Full Code Here

Examples of org.geotools.styling.StyleBuilder.literalExpression()

    chSel.setRGBChannels(chTypeRed, chTypeBlue, chTypeGreen);

    rsb_1.setChannelSelection(chSel);
    rsb_1.setOpacity(sldBuilder.literalExpression(1.0));
    rsb_1.setContrastEnhancement(cntEnh);
    rsb_1.setOverlap(sldBuilder.literalExpression("AVERAGE"));
   
    // visit the RasterSymbolizer
    rsh.visit(rsb_1);
   
    testRasterSymbolizerHelper(rsh);
View Full Code Here

Examples of org.geotools.styling.StyleBuilder.literalExpression()

    final SelectedChannelType chTypeBlue     = new SelectedChannelTypeImpl();
    final SelectedChannelType chTypeGreen   = new SelectedChannelTypeImpl();
    final ContrastEnhancement cntEnh = new ContrastEnhancementImpl();

    cntEnh.setMethod(ContrastMethod.HISTOGRAM);;
    cntEnh.setGammaValue(sldBuilder.literalExpression(0.50));
   
    chTypeRed.setChannelName("1");
    chTypeBlue.setChannelName("2");
    chTypeGreen.setChannelName("3");
    chSel.setRGBChannels(chTypeRed, chTypeBlue, chTypeGreen);
View Full Code Here

Examples of org.geotools.styling.StyleBuilder.literalExpression()

    chTypeRed.setChannelName("1");
    chTypeBlue.setChannelName("2");
    chTypeGreen.setChannelName("3");
    chSel.setRGBChannels(chTypeRed, chTypeBlue, chTypeGreen);
    rsb_1.setChannelSelection(chSel);
    rsb_1.setOpacity(sldBuilder.literalExpression(1.0));
    rsb_1.setContrastEnhancement(cntEnh);
    rsb_1.setOverlap(sldBuilder.literalExpression("AVERAGE"));
   
    // visit the RasterSymbolizer
    rsh.visit(rsb_1);
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.