Package org.opengis.filter

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


                case FilterType.COMPARE_NOT_EQUALS:
                    return factory.notEqual(expr1, expr2);

                case FilterType.COMPARE_GREATER_THAN:
                    return factory.greater(expr1, expr2);

                case FilterType.COMPARE_GREATER_THAN_EQUAL:
                    return factory.greaterOrEqual(expr1, expr2);

                case FilterType.COMPARE_LESS_THAN:
View Full Code Here


                switch (type) {
                case FilterType.COMPARE_EQUALS:
                    return factory.equals(expr1, expr2);

                case FilterType.COMPARE_GREATER_THAN:
                    return factory.greater(expr1, expr2);

                case FilterType.COMPARE_GREATER_THAN_EQUAL:
                    return factory.greaterOrEqual(expr1, expr2);

                case FilterType.COMPARE_LESS_THAN:
View Full Code Here

        WFSFeatureSource fs = wfs.getFeatureSource("topp:states");
       
        // build a filter with bits that cannot be encoded in OGC filter, but can be simplified
        // to one that can
        Filter f = ff.or(Arrays.asList(Filter.EXCLUDE, ff.and(Filter.INCLUDE, ff.greater(ff.property("PERSONS"), ff.literal(10000000)))));
        SimpleFeatureCollection fc = fs.getFeatures(f);
       
        // force calling a HITS query, it used to throw an exception
        int size = fc.size();
       
View Full Code Here

        SimpleFeatureSource source = wfs.getFeatureSource(typeName);

        FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2();
        Filter and = ff.and(
                Arrays.asList(Filter.INCLUDE,
                ff.greater(ff.property("gid"), ff.literal(0)),
                Filter.INCLUDE));
        Query query = new Query(typeName, and, 20, Query.ALL_NAMES, "my query");
        iterate(source.getFeatures(query), 20, false);       
    }
   
View Full Code Here

        fids.add(new FeatureIdImpl("comuni11.2671"));
       
        FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2();
        PropertyName bboxProperty = ff.property(sf.getDefaultGeometryProperty().getName());
        Query query = new Query(typeName, ff.and(
                ff.greater(ff.property("cod_reg"), ff.literal(0)),
                ff.and(
                        ff.bbox(bboxProperty, sf.getBounds()),
                        ff.id(fids))));       
        iterate(source.getFeatures(query), 1, true);
       
View Full Code Here

    // The usual array of property comparisons is supported
    // the comparison is based on the kind of data so both
    // numeric, date and string comparisons are supported.
    filter = ff.less(ff.property("depth"), ff.literal(300));
    filter = ff.lessOrEqual(ff.property("risk"), ff.literal(3.7));
    filter = ff.greater(ff.property("name"), ff.literal("Smith"));
    filter = ff.greaterOrEqual(ff.property("schedule"), ff.literal(new Date()));

    // PropertyIsBetween is a short inclusive test between two values
    filter = ff.between(ff.property("age"), ff.literal(20), ff.literal("29"));
    filter = ff.between(ff.property("group"), ff.literal("A"), ff.literal("D"));
View Full Code Here

    // with like filters (allowing you to select content that does not
    // match the provided pattern)
    filter = ff.not(ff.like(ff.property("code"), "230%"));

    // you can also combine filters to narrow the results returned
    filter = ff.and(ff.greater(ff.property("rainfall"), ff.literal(70)),
            ff.equal(ff.property("land_use"), ff.literal("urban"), false));

    filter = ff.or(ff.equal(ff.property("code"), ff.literal("approved")),
            ff.greater(ff.property("funding"), ff.literal(23000)));
View Full Code Here

    // you can also combine filters to narrow the results returned
    filter = ff.and(ff.greater(ff.property("rainfall"), ff.literal(70)),
            ff.equal(ff.property("land_use"), ff.literal("urban"), false));

    filter = ff.or(ff.equal(ff.property("code"), ff.literal("approved")),
            ff.greater(ff.property("funding"), ff.literal(23000)));

    // logical end
}

void temporal() throws Exception {
View Full Code Here

    // You can override this default with matchCase = false
    filter = ff.equal(ff.property("state"), ff.literal("new south wales"),
            false);

    // All property comparisons allow you to control case sensitivity
    Filter welcome = ff.greater(ff.property("zone"), ff.literal("danger"),
            false);
    // caseSensitive end
}

public void matchAction() {
View Full Code Here

public void matchAction() {
    FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2();
    Filter filter;
    // matchAction start
    filter = ff.greater(ff.property("child/age"), ff.literal(12), true,
            MatchAction.ALL);
    // matchAction end
}

public void matchActionAny() {
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.