Package org.opengis.filter

Examples of org.opengis.filter.PropertyIsGreaterThan


    }

    public void testGetFeaturesWithIsGreaterThanFilter() throws Exception {
        init();
        FilterFactory ff = dataStore.getFilterFactory();
        PropertyIsGreaterThan f = ff.greater(ff.property("speed_is"), ff.literal(300));
        SimpleFeatureCollection features = featureSource.getFeatures(f);
        assertEquals(0, features.size());
    }
View Full Code Here


        fac = CommonFactoryFinder.getFilterFactory2(GeoTools.getDefaultHints());
    }
   
    public void testLogicFilterDuplication() throws IllegalFilterException {
      //create a filter
      PropertyIsGreaterThan greater = fac.greater(fac.literal(2), fac.literal(1));
      PropertyIsLessThan less = fac.less(fac.literal(3), fac.literal(4));
      And and = fac.and(greater, less);
     
      //duplicate it
      DuplicatingFilterVisitor visitor = new DuplicatingFilterVisitor();
View Full Code Here

            //            rules[i].setName("class "+i);
            LOGGER.fine("added class " + breaks[i - 1] + "->" + breaks[i] + " " + colors[i]);
        }

        PropertyIsGreaterThan cf2 = ff.greater( value, ff.literal(breaks[colors.length - 2]));
       
        LOGGER.fine(cf2.toString());
        rules[colors.length - 1] = sf.createRule();
        rules[colors.length - 1].setFilter(cf2);
        rules[colors.length - 1].setName(geomName);
        c = this.createColor(colors[colors.length - 1]);
View Full Code Here

        FilterFactory ff = CommonFactoryFinder.getFilterFactory(null);
       
        Expression left = ff.literal(2);
        Expression right = ff.literal(1);
       
        PropertyIsGreaterThan filter = ff.greater( left, right );
       
        assertTrue( filter.evaluate( null ) );
        assertTrue( filter instanceof PropertyIsGreaterThan );
    }
View Full Code Here

    public void testPropertyIsGreaterThan() throws Exception {
   
        StringBuilder builder = new StringBuilder(URL_LAYER_ASIA);
        SFSFilterVisitor visitor = new SFSFilterVisitor(true);
        PropertyIsGreaterThan filter = FF.greater(FF.property(PROPERTY_NAME),
                FF.literal(PROPERTY_VALUE));
        visitor.visit(filter, null);
        visitor.finish(builder, false);
        assertEquals(URL_LAYER_ASIA + "?" + PROPERTY_NAME + "__gt=" + PROPERTY_VALUE + "&queryable="
                + PROPERTY_NAME, URLDecoder.decode(builder.toString(),"UTF-8"));
View Full Code Here

    }

    public void testPropertyIsGreaterThan() throws Exception {
        StringBuilder builder = new StringBuilder(URL);
        GeoRestFilterVisitor visitor = new GeoRestFilterVisitor(true);
        PropertyIsGreaterThan filter = FF.greater(FF.property(PROPERTY_NAME),
                FF.literal(PROPERTY_VALUE));
        visitor.visit(filter, null);
        visitor.finish(builder, false);
        Assert.assertEquals(URL + "?" + PROPERTY_NAME + "__gt=" + PROPERTY_VALUE + "&queryable="
                + PROPERTY_NAME, builder.toString());
View Full Code Here

TOP

Related Classes of org.opengis.filter.PropertyIsGreaterThan

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.