本文整理了Java中org.opengis.filter.FilterFactory2.before()
方法的一些代码示例,展示了FilterFactory2.before()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。FilterFactory2.before()
方法的具体详情如下:
包路径:org.opengis.filter.FilterFactory2
类名称:FilterFactory2
方法名:before
暂无
代码示例来源:origin: geotools/geotools
public Object visit(Before before, Object extraData) {
return getFactory(extraData)
.before(
visit(before.getExpression1(), extraData),
visit(before.getExpression2(), extraData),
before.getMatchAction());
}
代码示例来源:origin: geotools/geotools
public Object visit(Before before, Object extraData) {
Expression expr1 = optimizeTime(before.getExpression1(), extraData);
Expression expr2 = optimizeTime(before.getExpression2(), extraData);
return getFactory(extraData).before(expr1, expr2, before.getMatchAction());
}
代码示例来源:origin: geotools/geotools
@Test
public void testAndTemporalBefore() throws Exception {
final Instant start = instant("2016-01-01T00:00:00.000-0500");
final Filter f =
ff.and(
ff.bbox("geom", -10, -10, 10, 10, null),
ff.before(ff.literal("someDate"), ff.literal(start)));
final Envelope env = (Envelope) f.accept(visitor, null);
assertEquals(new Envelope(-10, 10, -10, 10), env);
}
代码示例来源:origin: org.locationtech.geomesa/geomesa-native-api
/**
* Converts the current start- and end-point into a valid temporal filter.
*
* @return the net temporal filter that results from the current temporal bounds
*/
public Filter getTemporalFilter() {
// if neither end-point is set, there is no valid filter
if (start == null && end == null) return Filter.INCLUDE;
// if the start-point alone is defined, this is an AFTER query
if (end == null) return ff.after(DTGProperty, ff.literal(start));
// if the end-point alone is defined, this is a BEFORE query
if (start == null) return ff.before(DTGProperty, ff.literal(end));
// both are defined; if they are ordered correctly, this is a DURING query
if (start.getTime() <= end.getTime()) return ff.between(DTGProperty, ff.literal(start), ff.literal(end));
// if you get this far, you have non-null temporal bounds that are improperly ordered;
// this is equivalent to having no valid temporal bounds
// TODO: log this occurrence, because it is unexpected, and the developer should be informed
return Filter.INCLUDE;
}
代码示例来源:origin: org.geotools/gt-main
public Object visit(Before before, Object extraData) {
return getFactory(extraData).before(visit(before.getExpression1(), extraData),
visit(before.getExpression2(), extraData));
}
内容来源于网络,如有侵权,请联系作者删除!