本文整理汇总了Java中org.opengis.filter.PropertyIsLessThan类的典型用法代码示例。如果您正苦于以下问题:Java PropertyIsLessThan类的具体用法?Java PropertyIsLessThan怎么用?Java PropertyIsLessThan使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PropertyIsLessThan类属于org.opengis.filter包,在下文中一共展示了PropertyIsLessThan类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: comparisonUsingExpressions
import org.opengis.filter.PropertyIsLessThan; //导入依赖的package包/类
/**
* Comparison between persons under 18 years old and over 65 years old
* @throws Exception
*/
static private void comparisonUsingExpressions() throws Exception {
// comparisonUsingExpressions start
Filter filter = ECQL.toFilter("(under18YearsOld * 19541453 / 100 ) < (over65YearsOld * 19541453 / 100 )");
// 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);
}
开发者ID:ianturton,项目名称:geotools-cookbook,代码行数:23,代码来源:ECQLExamples.java
示例2: visit
import org.opengis.filter.PropertyIsLessThan; //导入依赖的package包/类
@Override
public Object visit(
final PropertyIsLessThan filter,
final Object data ) {
final ByteArrayId leftResult = (ByteArrayId) filter.getExpression1().accept(
this,
data);
final Object value = filter.getExpression2().accept(
this,
data);
if (value instanceof Number) {
return new PropertyConstraintSet(
new NumericLessThanConstraint(
leftResult,
(Number) value));
}
return new PropertyConstraintSet();
}
开发者ID:locationtech,项目名称:geowave,代码行数:20,代码来源:PropertyFilterVisitor.java
示例3: testPropertyIsLessThan
import org.opengis.filter.PropertyIsLessThan; //导入依赖的package包/类
@Test
public void testPropertyIsLessThan() {
PropertyIsLessThan filter = ff.less(ff.property("doubleAttr"), ff.literal("4.5"));
Map<String,Object> expected = ImmutableMap.of("range", ImmutableMap.of("doubleAttr", ImmutableMap.of("lt", 4.5)));
builder.visit(filter, null);
assertTrue(builder.createFilterCapabilities().fullySupports(filter));
assertEquals(expected, builder.getQueryBuilder());
}
开发者ID:ngageoint,项目名称:elasticgeo,代码行数:10,代码来源:ElasticFilterTest.java
示例4: testGetFeaturesWithIsLessThanFilter
import org.opengis.filter.PropertyIsLessThan; //导入依赖的package包/类
@Test
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());
}
开发者ID:ngageoint,项目名称:elasticgeo,代码行数:9,代码来源:ElasticFeatureFilterIT.java
示例5: visit
import org.opengis.filter.PropertyIsLessThan; //导入依赖的package包/类
@Override
public Object visit(
final PropertyIsLessThan filter,
final Object data ) {
return new ExtractGeometryFilterVisitorResult(
infinity(),
null);
}
开发者ID:locationtech,项目名称:geowave,代码行数:9,代码来源:ExtractGeometryFilterVisitor.java
示例6: visit
import org.opengis.filter.PropertyIsLessThan; //导入依赖的package包/类
@Override
public Object visit(
final PropertyIsLessThan filter,
final Object data ) {
final TemporalConstraints leftResult = (TemporalConstraints) filter.getExpression1().accept(
this,
data);
final TemporalConstraints rightResult = (TemporalConstraints) filter.getExpression2().accept(
this,
data);
if (leftResult.isEmpty() || rightResult.isEmpty()) {
return new TemporalConstraints();
}
if (leftResult instanceof ParameterTimeConstraint) {
return new ParameterTimeConstraint(
new TemporalRange(
TemporalRange.START_TIME,
new Date(
rightResult.getStartRange().getStartTime().getTime() - 1)),
leftResult.getName());
}
else {
return new ParameterTimeConstraint(
new TemporalRange(
new Date(
leftResult.getStartRange().getStartTime().getTime() + 1),
TemporalRange.END_TIME),
rightResult.getName());
}
}
开发者ID:locationtech,项目名称:geowave,代码行数:32,代码来源:ExtractTimeFilterVisitor.java
示例7: visit
import org.opengis.filter.PropertyIsLessThan; //导入依赖的package包/类
@Override
public Object visit(
final PropertyIsLessThan filter,
final Object extraData ) {
if (!usesProperty(filter)) {
return Filter.INCLUDE;
}
return super.visit(
filter,
extraData);
}
开发者ID:locationtech,项目名称:geowave,代码行数:12,代码来源:PropertyIgnoringFilterVisitor.java
示例8: visit
import org.opengis.filter.PropertyIsLessThan; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
public Object visit(PropertyIsLessThan filter, Object userData) {
String propertyName = getPropertyName(filter.getExpression1());
String finalName = parsePropertyName(propertyName, userData);
Object literal = getLiteralValue(filter.getExpression2());
return Restrictions.lt(finalName, castLiteral(literal, propertyName));
}
开发者ID:geomajas,项目名称:geomajas-project-server,代码行数:10,代码来源:CriteriaVisitor.java
示例9: visit
import org.opengis.filter.PropertyIsLessThan; //导入依赖的package包/类
@Override
public Object visit(PropertyIsLessThan pilt, Object o) {
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
}
开发者ID:DennisPallett,项目名称:gt-jdbc-monetdb-simple,代码行数:5,代码来源:FilterToSQL.java
示例10: visit
import org.opengis.filter.PropertyIsLessThan; //导入依赖的package包/类
/**
* Write the FilterBuilder for this kind of filter
*
* @param filter the filter to visit
* @param extraData extra data (unused by this method)
*
*/
public Object visit(PropertyIsLessThan filter, Object extraData) {
visitBinaryComparisonOperator((BinaryComparisonOperator)filter, "<");
return extraData;
}
开发者ID:ngageoint,项目名称:elasticgeo,代码行数:12,代码来源:FilterToElastic.java
注:本文中的org.opengis.filter.PropertyIsLessThan类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论