coords2[4] = new Coordinate(10, 10);
GeometryFactory gf = new GeometryFactory(new PrecisionModel());
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));
coords2[0] = new Coordinate(20, 20);
coords2[1] = new Coordinate(21, 20);
coords2[2] = new Coordinate(21, 21);
coords2[3] = new Coordinate(20, 21);
coords2[4] = new Coordinate(20, 20);
right = fac.literal(gf
.createPolygon(gf.createLinearRing(coords2), null));
filter = fac.beyond(left, right, 2, "m");
LOGGER.finer(filter.toString());
LOGGER.finer("contains feature: " + filter.evaluate(testFeature));
assertTrue(filter.evaluate(testFeature));
right = new LiteralExpressionImpl(null);
filter = fac.beyond(left, right, 2, "m");
LOGGER.finer(filter.toString());
LOGGER.finer("contains feature: " + filter.evaluate(testFeature));
assertFalse(filter.evaluate(testFeature));
}