Examples of greater()


Examples of org.opengis.filter.FilterFactory.greater()

        FilterFactory ff = CommonFactoryFinder.getFilterFactory(null);
        Filter f = ff.equal(ff.property("STATE_NAME"), ff.literal("New York"), true);
        assertEquals(1, fs.getFeatures(f).size());
       
        // greater than
        f = ff.greater(ff.property("PERSONS"), ff.literal(10000000));
        assertEquals(6, fs.getFeatures(f).size());
       
        // mix in a filter that cannot be encoded
        f = ff.and(f, ff.like(ff.property("STATE_NAME"), "C*"));
        assertEquals(1, fs.getFeatures(f).size());
View Full Code Here

Examples of org.opengis.filter.FilterFactory.greater()

        FilterFactory ff = CommonFactoryFinder.getFilterFactory(null);
        Filter f = ff.bbox("the_geom", -75.102613, 40.212597, -72.361859,41.512517, null);
        assertEquals(4, fs.getFeatures(f).size());
       
        // mix in an attribute filter
        f = ff.and(f, ff.greater(ff.property("PERSONS"), ff.literal("10000000")));
        assertEquals(6, fs.getFeatures(f).size());  
    }

    // ---------------------------------------------------------------------------------------
    // SUPPORT METHODS
View Full Code Here

Examples of org.opengis.filter.FilterFactory.greater()

                .getFeatures(equivalentSourceFilter);

        int count = 0;
        int expectedCount = collection.size();

        Filter badFilter = ff.greater(ff.property("sample/measurement[1]/value"), ff
                .literal(new Integer(3)));

        while (reader.hasNext()) {
            Feature f = (Feature) reader.next();
            assertNotNull(f);
View Full Code Here

Examples of org.opengis.filter.FilterFactory.greater()

        builder.setBinding(String.class);
        AttributeDescriptor attribute = builder.buildDescriptor("attribute");
        assertEquals(19, FeatureTypes.getFieldLength(attribute));
       
        // flip expression
        builder.addRestriction(ff.greater(ff.literal(20), length));
        builder.setBinding(String.class);
        attribute = builder.buildDescriptor("attribute");
        assertEquals(19, FeatureTypes.getFieldLength(attribute));
    }
   
View Full Code Here

Examples of org.opengis.filter.FilterFactory.greater()

    }
   
    private Filter newTestFilter() {
        // Filter collects entries with number > 500
        FilterFactory ff = CommonFactoryFinder.getFilterFactory(null);
        return ff.greater(ff.property(NUMBER_COL), ff.literal(500));
    }
   
    private List<String> filteredCities() {
        return Arrays.asList("Lausanne", "Victoria", "Cape Town");
    }
View Full Code Here

Examples of org.opengis.filter.FilterFactory.greater()

    }

    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());
    }

    public void testGetFeaturesWithIsGreaterThanOrEqualToFilter() throws Exception {
View Full Code Here

Examples of org.opengis.filter.FilterFactory.greater()

        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

Examples of org.opengis.filter.FilterFactory.greater()

        FilterFactory ff = CommonFactoryFinder.getFilterFactory(null);
        Filter f = ff.equal(ff.property("STATE_NAME"), ff.literal("New York"), true);
        assertEquals(1, fs.getFeatures(f).size());
       
        // greater than
        f = ff.greater(ff.property("PERSONS"), ff.literal(10000000));
        assertEquals(6, fs.getFeatures(f).size());
       
        // mix in a filter that cannot be encoded
        f = ff.and(f, ff.like(ff.property("STATE_NAME"), "C*"));
        assertEquals(1, fs.getFeatures(f).size());
View Full Code Here

Examples of org.opengis.filter.FilterFactory.greater()

        FilterFactory ff = CommonFactoryFinder.getFilterFactory(null);
        Filter f = ff.bbox("the_geom", -75.102613, 40.212597, -72.361859,41.512517, null);
        assertEquals(4, fs.getFeatures(f).size());
       
        // mix in an attribute filter
        f = ff.and(f, ff.greater(ff.property("PERSONS"), ff.literal("10000000")));
        assertEquals(6, fs.getFeatures(f).size());  
    }

    // ---------------------------------------------------------------------------------------
    // SUPPORT METHODS
View Full Code Here

Examples of org.opengis.filter.FilterFactory.greater()

            // shortcut exit, we had a exact match
            nearest.setValue(maxBelow, null);
        } else {
            // grab mind of values higher than the target
            Query qAbove = new Query(query);
            Filter aboveFilter = ff.greater(ff.property(attribute), ff.literal(targetValue));
            qAbove.setFilter(ff.and(query.getFilter(), aboveFilter));
            MinVisitor min = new MinVisitor(attribute);
            handleVisitor(qAbove, min);
            Comparable minAbove = (Comparable) min.getResult().getValue();
            nearest.setValue(maxBelow, minAbove);
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.