Package org.opengis.filter.expression

Examples of org.opengis.filter.expression.Expression


        }
    }

    private void applyLabel( TextSymbolizer textSymbolizer, StyleBuilder styleBuilder ) {

        Expression currLabel = null;
        if (labelCombo.getSelectionIndex() != -1) {
            String selectedLabel = labelCombo.getItem(labelCombo.getSelectionIndex());

            RGB xfontColor = labelFont.getColorValue();
            textSymbolizer.setFill(styleBuilder.createFill(
View Full Code Here


            double offset = Double.parseDouble(this.place.getText());
            placement = build.createLinePlacement(offset);
        }
        this.labelPlacement = placement;
       
        Expression exp = (Expression) CommonFactoryFinder.getFilterFactory(GeoTools.getDefaultHints()).
                property(this.labelType);
        TextSymbolizer text = build.createTextSymbolizer(fill, new Font[] {gtFont},
                null, exp, placement, null);
        if (SLD.isLine(this.schema)) {
            text.addToOptions("group", "yes"); //$NON-NLS-1$ //$NON-NLS-2$
View Full Code Here

    }

        private void modifyColourColumn( Object element, Object value ) {
            Item item = (Item) element;
            Object data = item.getData();
            Expression newColorExpr = null;
            Expression oldColorExpr = null;
            Color newColor = null;
            StyleBuilder sb = new StyleBuilder();
            if (value instanceof RGB) {
                RGB rgb = (RGB) value;
                newColor = new Color(rgb.red, rgb.green, rgb.blue);
View Full Code Here

       
//        IProgressMonitor monitor = new NullProgressMonitor();
//        getSelectedLayer().getResource(FeatureSource.class, monitor);
       
        Graphic g = sym.getGraphic();
        Expression opacity = g.getOpacity();
        Expression rotation = g.getRotation();
        Expression size = g.getSize();
        AnchorPoint anchor = g.getAnchorPoint();
        Displacement displacement = g.getDisplacement();
       
       
    }
View Full Code Here

                minScale, maxScale);
    }

    private static float getOpacity( RasterSymbolizer sym ) {
        float alpha = 1.0f;
        Expression exp = sym.getOpacity();
        if (exp == null)
            return alpha;
        Object obj = exp.evaluate(null);
        if (obj == null)
            return alpha;
        Number num = null;
        if (obj instanceof Number)
            num = (Number) obj;
View Full Code Here

                minScale, maxScale);
    }

    private static float getOpacity( RasterSymbolizer sym ) {
        float alpha = 1.0f;
        Expression exp = sym.getOpacity();
        if (exp == null)
            return alpha;
        Object obj = exp.evaluate(null);
        if (obj == null)
            return alpha;
        Number num = null;
        if (obj instanceof Number)
            num = (Number) obj;
View Full Code Here

        Symbolizer[] symb2 = rule2.getSymbolizers();
        if (symb1.length != symb2.length) {
            SLDPlugin.log("StyleThemePage.swapColours(): Number of symbolizers each rule and not equal - aborting colour swap", null); //$NON-NLS-1$
            return;
        }
        Expression tempColour;
        for (int i = 0; i < symb1.length; i++) {
            if (symb1[i] instanceof PolygonSymbolizer) {
                tempColour = ((PolygonSymbolizer) symb1[i]).getFill().getColor();
                ((PolygonSymbolizer) symb1[i]).getFill().setColor(((PolygonSymbolizer) symb2[i]).getFill().getColor());
                ((PolygonSymbolizer) symb2[i]).getFill().setColor(tempColour);
View Full Code Here

               
        //generate the defaults
        Runnable genDefault = new Runnable(){
            public void run() {
                //generate the expression
                Expression expr = null;
                Expression attr = ff.property(selectedAttributeType.getName());
               
                if (normalize != null) {
                    Divide divide = ff.divide(attr, ff.property(normalize.getName()));
                    expr = divide;
                } else {
View Full Code Here

                        updateUnique(attribute, uniqueCounts.get(attribute));
                    }
                    //count the number of unique attributes
                    int uniqueCount = -1;
                    try {
                        Expression attr = ff.property(attribute);
                        UniqueVisitor uniques = new UniqueVisitor(attr);
                        ProgressListener progress = new NullProgressListener();
                        collection.accepts(uniques, progress);
                        uniqueCount = uniques.getUnique().size();
                    } catch (IOException e1) {
View Full Code Here

            if(trySLD) {
                StringBuffer label = new StringBuffer();

                for (Symbolizer sym : symbolizers) {
                    if (sym instanceof TextSymbolizer) {
                        Expression e = SLD.textLabel((TextSymbolizer) sym);
                        Object object = null;
                        if (e != null)
                            object = e.evaluate(feature);
                        String value = null;

                        if (object instanceof String) {
                            value = (String) object;
                        } else {
View Full Code Here

TOP

Related Classes of org.opengis.filter.expression.Expression

Copyright © 2018 www.massapicom. 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.