Examples of evaluate()


Examples of org.opengis.filter.spatial.Beyond.evaluate()

        Literal right = new LiteralExpressionImpl(gf.createPolygon(gf.createLinearRing(
                coords2),null));

        Beyond filter = fac.beyond(left, right, 20, "m");
        LOGGER.finer(filter.toString());
        LOGGER.finer("contains feature: " + filter.evaluate(testFeature));
        assertFalse(filter.evaluate(testFeature));
       
        filter = fac.beyond(left, right, 2, "m");
        LOGGER.finer("contains feature: " + filter.evaluate(testFeature));
        assertTrue(filter.evaluate(testFeature));       

Examples of org.opengis.filter.spatial.Contains.evaluate()

        PropertyName expr2 = new AttributeExpressionImpl(testSchema, "testGeometry");
       
        Contains filter = fac.contains(expr1, expr2);

        LOGGER.finer( filter.toString());           
        LOGGER.finer( "contains feature: " + filter.evaluate(testFeature));
        assertTrue(filter.evaluate(testFeature));

        Function function = new GeometryFunction(geom);
        filter = fac.contains(expr1, function);
        LOGGER.finer( filter.toString());           

Examples of org.opengis.filter.spatial.DWithin.evaluate()

        Literal right = new LiteralExpressionImpl(gf.createPolygon(gf.createLinearRing(
                coords2),null));
       
        DWithin filter = fac.dwithin(left, right, 20, "m");
        LOGGER.finer(filter.toString());
        LOGGER.finer("contains feature: " + filter.evaluate(testFeature));
        assertTrue(filter.evaluate(testFeature));

        filter = fac.dwithin(left, right, 2, "m");
        LOGGER.finer(filter.toString());
        LOGGER.finer("contains feature: " + filter.evaluate(testFeature));

Examples of org.opengis.filter.spatial.Disjoint.evaluate()

        LineString geom = gf.createLineString(coords);
        LiteralExpressionImpl expr2 = new LiteralExpressionImpl(geom);
        Disjoint disjoint = fac.disjoint(expr1, expr2);

        LOGGER.finer( disjoint.toString());           
        LOGGER.finer( "contains feature: " + disjoint.evaluate(testFeature));
        assertTrue(disjoint.evaluate(testFeature));

        Function function = new GeometryFunction(geom);
        disjoint = fac.disjoint(expr1, function);
        LOGGER.finer( disjoint.toString());           

Examples of org.opengis.filter.spatial.Equals.evaluate()

        LineString geom = gf.createLineString(coords);
        Literal right = new LiteralExpressionImpl(geom);
        Equals filter = fac.equal(left, right);

        LOGGER.finer( filter.toString());           
        LOGGER.finer( "contains feature: " + filter.evaluate(testFeature));
        assertTrue(filter.evaluate(testFeature));

        Function function = new GeometryFunction(geom);
        filter = fac.equal(left, function);
        LOGGER.finer( filter.toString());           

Examples of org.opengis.filter.spatial.Intersects.evaluate()

        LineString geom = gf.createLineString(coords);
        LiteralExpressionImpl expr2 = new LiteralExpressionImpl(geom);
        Intersects intersects = fac.intersects(expr1, expr2);

        LOGGER.finer( intersects.toString());           
        LOGGER.finer( "contains feature: " + intersects.evaluate(testFeature));
        assertTrue(intersects.evaluate(testFeature));
    
        intersects = fac.intersects(expr2, expr1);

        LOGGER.finer( intersects.toString());           

Examples of org.opengis.filter.spatial.Within.evaluate()

        assertTrue(filter.evaluate(testFeature));

        filter = fac.within(expr2, expr1);

        LOGGER.finer( filter.toString());           
        LOGGER.finer( "contains feature: " + filter.evaluate(testFeature));
        assertFalse(filter.evaluate(testFeature));

        coords = new Coordinate[] {
          new Coordinate(2, 2),
          new Coordinate(6, 0),

Examples of org.opengis.filter.temporal.After.evaluate()

        Expression leftExpr = filter.getExpression1();
        Expression rightExpr = filter.getExpression2();
        System.out.println("left expression value: " + leftExpr.evaluate(city));
        System.out.println("right expression value: " + rightExpr.evaluate(city));
       
        Boolean result = filter.evaluate(city);
        System.out.println("Result of filter evaluation: " + result);       
  }
 
    private static void afterPredicateGMT3() throws Exception{
     

Examples of org.opengis.filter.temporal.Before.evaluate()

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

    private static void afterPredicate() throws Exception{
     

Examples of org.opengis.filter.temporal.During.evaluate()

        Expression leftExpr = filter.getExpression1();
        Expression rightExpr = filter.getExpression2();
        System.out.println("left expression value: " + leftExpr.evaluate(city));
        System.out.println("right expression value: " + rightExpr.evaluate(city));
       
        Boolean result = filter.evaluate(city);
        System.out.println("Result of filter evaluation: " + result);       
  }
 
    /**
     * Example using the "contains" intersection matrix.
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.