Package org.opengis.filter

Examples of org.opengis.filter.FilterFactory2.literal()


                            // in summary, requestedMax > min && requestedMin < max
                            Filter maxCondition = ff.greaterOrEqual(
                                                        ff.literal(maxValue),
                                                        ff.property(propertyName));
                            Filter minCondition = ff.lessOrEqual(
                                                        ff.literal(minValue),
                                                        ff.property(additionalPropertyName));
                           
                            filters.add(ff.and(Arrays.asList(maxCondition,minCondition)));
                            continue;
                        } else {
View Full Code Here


                    }
                    filters.add(
                            ff.and(
                                    ff.lessOrEqual(
                                            ff.property(propertyName),
                                            ff.literal(value)),
                                    ff.greaterOrEqual(
                                            ff.property(additionalPropertyName),
                                            ff.literal(value))));
                }
            }
View Full Code Here

                                    ff.lessOrEqual(
                                            ff.property(propertyName),
                                            ff.literal(value)),
                                    ff.greaterOrEqual(
                                            ff.property(additionalPropertyName),
                                            ff.literal(value))));
                }
            }
            return ff.or(filters);
        }
    }
View Full Code Here

        NamespaceSupport namespaces = new NamespaceSupport();
        namespaces.declarePrefix("gml", GML.NAMESPACE);
        namespaces.declarePrefix("xmml", XMMLNS);

        FilterFactory2 ff = new FilterFactoryImplNamespaceAware(namespaces);
        PropertyIsEqualTo complexFilter = ff.equals(ff.property("gml:name"), ff
                .literal("SWADLINCOTE"));

        visitor = new UnmappingFilterVisitor(mapping);

        Filter unrolled = (Filter) complexFilter.accept(visitor, null);
View Full Code Here

        StyleBuilder sb = new StyleBuilder();
        Mark mark = sb.createMark("square");
        mark.setStroke(null);
        Graphic graphic = sb.createGraphic(null, mark, null);
        FilterFactory2 ff = sb.getFilterFactory();
        graphic.setSize(ff.function("env", ff.literal("test")));
        PointSymbolizer ps = sb.createPointSymbolizer(graphic);
        Style style = sb.createStyle(ps);

        try {
            EnvFunction.setGlobalValue("test", 10);
View Full Code Here

    @Test
    public void testGEOT3111() throws Exception {
        FilterFactory2 ff2 = CommonFactoryFinder.getFilterFactory2(null);
        StyleFactory sf = CommonFactoryFinder.getStyleFactory(null);
        Symbolizer sym = sf.createPolygonSymbolizer(Stroke.NULL,
                sf.createFill(ff2.literal(Color.CYAN)), null);
        Style style = SLD.wrapSymbolizers(sym);

        MapContent mc = new MapContent();
        mc.addLayer(new FeatureLayer(fs, style));
View Full Code Here

                final GridEnvelope2D range = new GridEnvelope2D(rasterArea);
                gg.setValue(new GridGeometry2D(range, reducedEnvelope));

                final ParameterValue<Filter> filterParam = NetCDFFormat.FILTER.createValue();
                FilterFactory2 FF = FeatureUtilities.DEFAULT_FILTER_FACTORY;
                Filter filter = FF.equals(FF.property("z"), FF.literal(450.0));
                filterParam.setValue(filter);

                GeneralParameterValue[] values = new GeneralParameterValue[] { filterParam };
                GridCoverage2D coverage = reader.read(coverageName, values);
                assertNotNull(coverage);
View Full Code Here

    private Style createCoverageStyle(String bandName) {
        StyleFactory sf = CommonFactoryFinder.getStyleFactory(null);
        FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2(null);

        ContrastEnhancement ce = sf.contrastEnhancement(ff.literal(1.0), ContrastMethod.NORMALIZE);
        SelectedChannelType sct = sf.createSelectedChannelType(bandName, ce);

        RasterSymbolizer sym = sf.getDefaultRasterSymbolizer();
        ChannelSelection sel = sf.channelSelection(sct);
        sym.setChannelSelection(sel);
View Full Code Here

        final Rule rule = style.featureTypeStyles().get(0).rules().get(0);
        final GraphicLegend legend = (GraphicLegend) rule.getLegend();
       
       
        // Set rotation to 45 degrees
        legend.setRotation( ff.literal(45.0) );
       
        // Paint legend using StyledShapePainter
        final Point point = gf.createPoint(new Coordinate(width / 2, height / 2));
        final LiteShape2 shape = new LiteShape2(point, null, null, false);
       
View Full Code Here

          MultiLineString ml = gf.createMultiLineString(geometries);
         
          FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2(null);
         
          PropertyName p = ff.property(aname("geom"));       
          Literal collect = ff.literal(ml);
       
          DWithin dwithinGeomCo  = ((FilterFactory2) ff).dwithin(p, collect, 5, "meter");
          Query dq = new Query(tname("road"), dwithinGeomCo);
          SimpleFeatureCollection features = dataStore.getFeatureSource(tname("road")).getFeatures(dq);
          assertEquals(0, features.size());
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.