Package org.opengis.filter

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


*/
// grabSelectedNameIgnoreCase start
SimpleFeatureCollection grabSelectedNameIgnoreCase(String name) throws Exception {
    FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2();
   
    Filter filter = ff.equal(ff.property("Name"), ff.literal(name), false);
    return featureSource.getFeatures(filter);
}

// grabSelectedNameIgnoreCase end

View Full Code Here


    // start ff example
    FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2();
    Filter filter;

    // the most common selection criteria is a simple equal test
    ff.equal(ff.property("land_use"), ff.literal("URBAN"));

    // You can also quickly test if a property has a value
    filter = ff.isNull(ff.property("approved"));

    // The usual array of property comparisons is supported
View Full Code Here

    // 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)));

    // logical end
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
}
View Full Code Here

void caseSensitive() throws Exception {
    // caseSensitive start
    FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2();

    // default is matchCase = true
    Filter filter = ff.equal(ff.property("state"), ff.literal("queensland"));

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

    // default is matchCase = true
    Filter filter = ff.equal(ff.property("state"), ff.literal("queensland"));

    // 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);
View Full Code Here

    public void testEqualsFilter() throws Exception {
        FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2(null);
        // should match only "r3"
        GeometryFactory gf = new GeometryFactory();
        Geometry g = gf.createGeometry((Geometry) td.roadFeatures[2].getDefaultGeometry());
        Equals cs = ff.equal(ff.literal(g), ff.property(aname("geom")));
        FeatureCollection features = dataStore.getFeatureSource(tname("road")).getFeatures(cs);
        checkSingleResult(features, "r3");
    }

    protected void checkSingleResult(FeatureCollection features, String name) {
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.