Package org.opengis.filter

Examples of org.opengis.filter.PropertyIsLessThan


    }

    public void testPropertyIsLessThanParse() throws Exception {
        FilterMockData.propertyIsLessThan(document, document);

        PropertyIsLessThan equalTo = (PropertyIsLessThan) parse();
        assertNotNull(equalTo);

        assertNotNull(equalTo.getExpression1());
        assertNotNull(equalTo.getExpression2());
    }
View Full Code Here


        assertNotNull(equalTo.getExpression1());
        assertNotNull(equalTo.getExpression2());
    }

    public void testPropertyIsLessThanEncode() throws Exception {
        PropertyIsLessThan equalTo = FilterMockData.propertyIsLessThan();

        Document dom = encode(equalTo, OGC.PropertyIsLessThan);
        assertEquals(1,
            dom.getElementsByTagNameNS(OGC.NAMESPACE, OGC.PropertyName.getLocalPart()).getLength());
        assertEquals(1,
View Full Code Here

    }

    public void testPropertyIsLessThanParse() throws Exception {
        FilterMockData.propertyIsLessThan(document, document);

        PropertyIsLessThan equalTo = (PropertyIsLessThan) parse();
        assertNotNull(equalTo);

        assertNotNull(equalTo.getExpression1());
        assertNotNull(equalTo.getExpression2());
    }
View Full Code Here

        assertNotNull(equalTo.getExpression1());
        assertNotNull(equalTo.getExpression2());
    }

    public void testPropertyIsLessThanEncode() throws Exception {
        PropertyIsLessThan equalTo = FilterMockData.propertyIsLessThan();

        Document dom = encode(equalTo, OGC.PropertyIsLessThan);
        assertEquals(1,
            dom.getElementsByTagNameNS(OGC.NAMESPACE, OGC.PropertyName.getLocalPart()).getLength());
        assertEquals(1,
View Full Code Here

        org.opengis.filter.expression.Literal date = period.getBeginning();

        org.opengis.filter.expression.Expression property = this.resultStack
                .popExpression();

        PropertyIsLessThan filter = filterFactory.less(property, date);

        return filter;
    }
View Full Code Here

     
      Filter actual = CompilerUtil.parseFilter(this.language, prop + " < 100");
   
      Assert.assertTrue("PropertyIsLessThan filter was expected", actual instanceof PropertyIsLessThan);
   
      PropertyIsLessThan lessFilter = (PropertyIsLessThan) actual;
      Expression property = lessFilter.getExpression1();
   
      Assert.assertEquals(propExpected, property.toString());

    }
View Full Code Here

    }

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

    }
   
    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();
      Filter newFilter = (Filter) and.accept(visitor, fac);
View Full Code Here

        Style ret = createStyle();

        //        ret.setName(name);
        Rule[] rules = new Rule[colors.length + 1];
       
        PropertyIsLessThan cf1 = ff.less( value, ff.literal( breaks[0] ));       
       
        LOGGER.fine(cf1.toString());
        rules[0] = sf.createRule();
        rules[0].setFilter(cf1);

        //        rules[0].setName("lowest");
        Color c = this.createColor(colors[0]);
View Full Code Here

        // comparisonUsingExpressions end
        SimpleFeature city = DataExamples.getInstanceOfCity();
       
        Utility.prittyPrintFilter(filter);

        PropertyIsLessThan lessThan =(PropertyIsLessThan) filter;
        Expression leftExpr = lessThan.getExpression1();
        Expression rightExpr = lessThan.getExpression2();
        System.out.println("left expression value: " + leftExpr.evaluate(city));
        System.out.println("right expression value: " + rightExpr.evaluate(city));
       
        Boolean result = lessThan.evaluate(city);
        System.out.println("Result of filter evaluation: " + result);
    }
View Full Code Here

TOP

Related Classes of org.opengis.filter.PropertyIsLessThan

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.