本文整理汇总了Java中org.opengis.filter.spatial.Disjoint类的典型用法代码示例。如果您正苦于以下问题:Java Disjoint类的具体用法?Java Disjoint怎么用?Java Disjoint使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Disjoint类属于org.opengis.filter.spatial包,在下文中一共展示了Disjoint类的16个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: testDisjointFilter
import org.opengis.filter.spatial.Disjoint; //导入依赖的package包/类
@Test
public void testDisjointFilter() throws Exception {
init("not-active","geo3");
FilterFactory2 ff = (FilterFactory2) dataStore.getFilterFactory();
GeometryFactory gf = new GeometryFactory();
PackedCoordinateSequenceFactory sf = new PackedCoordinateSequenceFactory();
Point ls = gf.createPoint(sf.create(new double[] { 0, 0 }, 2));
Disjoint f = ff.disjoint(ff.property("geo3"), ff.literal(ls));
SimpleFeatureCollection features = featureSource.getFeatures(f);
assertEquals(2, features.size());
SimpleFeatureIterator fsi = features.features();
assertTrue(fsi.hasNext());
assertEquals(fsi.next().getID(), "active.12");
assertTrue(fsi.hasNext());
assertEquals(fsi.next().getID(), "active.13");
}
开发者ID:ngageoint,项目名称:elasticgeo,代码行数:17,代码来源:ElasticGeometryFilterIT.java
示例2: testFilters
import org.opengis.filter.spatial.Disjoint; //导入依赖的package包/类
@Test
public void testFilters() throws LayerException {
Style style = styleConverterService.convert(layerBeansMixedGeometryStyleInfoSld.getUserStyle());
List<Rule> rules = style.featureTypeStyles().get(0).rules();
assertThat(rules.get(0).getFilter()).isInstanceOf(BBOX.class);
assertThat(rules.get(1).getFilter()).isInstanceOf(Contains.class);
assertThat(rules.get(2).getFilter()).isInstanceOf(Crosses.class);
assertThat(rules.get(3).getFilter()).isInstanceOf(Disjoint.class);
assertThat(rules.get(4).getFilter()).isInstanceOf(Equals.class);
assertThat(rules.get(5).getFilter()).isInstanceOf(Intersects.class);
assertThat(rules.get(6).getFilter()).isInstanceOf(Overlaps.class);
assertThat(rules.get(7).getFilter()).isInstanceOf(Touches.class);
assertThat(rules.get(8).getFilter()).isInstanceOf(Within.class);
NamedStyleInfo namedStyleInfo = styleConverterService.convert(
layerBeansMixedGeometryStyleInfoSld.getUserStyle(), featureInfo);
Assert.assertEquals(9, namedStyleInfo.getFeatureStyles().size());
}
开发者ID:geomajas,项目名称:geomajas-project-server,代码行数:18,代码来源:StyleConverterServiceTest.java
示例3: visitComparisonSpatialOperator
import org.opengis.filter.spatial.Disjoint; //导入依赖的package包/类
void visitComparisonSpatialOperator(BinarySpatialOperator filter,
PropertyName property, Literal geometry, boolean swapped, Object extraData) {
// if geography case, sanitize geometry first
this.geometry = geometry;
if(isCurrentGeography()) {
this.geometry = clipToWorld(geometry);
}
visitBinarySpatialOperator(filter, (Expression)property, (Expression)this.geometry, swapped, extraData);
// if geography case, sanitize geometry first
if(isCurrentGeography()) {
if(isWorld(this.geometry)) {
// nothing to filter in this case
delegate.queryBuilder = MATCH_ALL;
return;
} else if(isEmpty(this.geometry)) {
if(!(filter instanceof Disjoint)) {
delegate.queryBuilder = ImmutableMap.of("bool", ImmutableMap.of("must_not", MATCH_ALL));
} else {
delegate.queryBuilder = MATCH_ALL;
}
return;
}
}
visitBinarySpatialOperator(filter, (Expression)property, (Expression)this.geometry, swapped, extraData);
}
开发者ID:ngageoint,项目名称:elasticgeo,代码行数:30,代码来源:FilterToElasticHelper.java
示例4: visitGeoShapeBinarySpatialOperator
import org.opengis.filter.spatial.Disjoint; //导入依赖的package包/类
void visitGeoShapeBinarySpatialOperator(BinarySpatialOperator filter, Expression e1, Expression e2,
boolean swapped, Object extraData) {
if (filter instanceof Disjoint) {
shapeRelation = SpatialRelation.DISJOINT;
} else if ((!swapped && filter instanceof Within) || (swapped && filter instanceof Contains)) {
shapeRelation = SpatialRelation.WITHIN;
} else if (filter instanceof Intersects || filter instanceof BBOX) {
shapeRelation = SpatialRelation.INTERSECTS;
} else {
FilterToElastic.LOGGER.fine(filter.getClass().getSimpleName()
+ " is unsupported for geo_shape types");
shapeRelation = null;
delegate.fullySupported = false;
}
if (shapeRelation != null) {
e1.accept(delegate, extraData);
key = (String) delegate.field;
e2.accept(delegate, extraData);
shapeBuilder = delegate.currentShapeBuilder;
}
if (shapeRelation != null && shapeBuilder != null) {
delegate.queryBuilder = ImmutableMap.of("bool", ImmutableMap.of("must", MATCH_ALL,
"filter", ImmutableMap.of("geo_shape",
ImmutableMap.of(key, ImmutableMap.of("shape", shapeBuilder, "relation", shapeRelation)))));
} else {
delegate.queryBuilder = MATCH_ALL;
}
}
开发者ID:ngageoint,项目名称:elasticgeo,代码行数:32,代码来源:FilterToElasticHelper.java
示例5: createFilterCapabilities
import org.opengis.filter.spatial.Disjoint; //导入依赖的package包/类
/**
* Sets the capabilities of this filter.
*
* @return FilterCapabilities for this Filter
*/
protected FilterCapabilities createFilterCapabilities() {
FilterCapabilities capabilities = new FilterCapabilities();
capabilities.addAll(FilterCapabilities.LOGICAL_OPENGIS);
capabilities.addAll(FilterCapabilities.SIMPLE_COMPARISONS_OPENGIS);
capabilities.addType(PropertyIsNull.class);
capabilities.addType(PropertyIsBetween.class);
capabilities.addType(Id.class);
capabilities.addType(IncludeFilter.class);
capabilities.addType(ExcludeFilter.class);
capabilities.addType(PropertyIsLike.class);
// spatial filters
capabilities.addType(BBOX.class);
capabilities.addType(Contains.class);
//capabilities.addType(Crosses.class);
capabilities.addType(Disjoint.class);
//capabilities.addType(Equals.class);
capabilities.addType(Intersects.class);
//capabilities.addType(Overlaps.class);
//capabilities.addType(Touches.class);
capabilities.addType(Within.class);
capabilities.addType(DWithin.class);
capabilities.addType(Beyond.class);
//temporal filters
capabilities.addType(After.class);
capabilities.addType(Before.class);
capabilities.addType(Begins.class);
capabilities.addType(BegunBy.class);
capabilities.addType(During.class);
capabilities.addType(Ends.class);
capabilities.addType(EndedBy.class);
capabilities.addType(TContains.class);
capabilities.addType(TEquals.class);
return capabilities;
}
开发者ID:ngageoint,项目名称:elasticgeo,代码行数:44,代码来源:FilterToElastic.java
示例6: testEmptyDisjointGeoShape
import org.opengis.filter.spatial.Disjoint; //导入依赖的package包/类
@Test
public void testEmptyDisjointGeoShape() throws CQLException {
LineString ls = gf.createLineString(new Coordinate[0]);
Disjoint filter = ff.disjoint(ff.property("geom"), ff.literal(ls));
Map<String,Object> expected = MATCH_ALL;
builder.visit(filter, null);
assertTrue(builder.createFilterCapabilities().fullySupports(filter));
assertEquals(expected, builder.getQueryBuilder());
}
开发者ID:ngageoint,项目名称:elasticgeo,代码行数:12,代码来源:ElasticFilterTest.java
示例7: visit
import org.opengis.filter.spatial.Disjoint; //导入依赖的package包/类
@Override
public Object visit(
final Disjoint filter,
Object data ) {
// disjoint does not define a rectangle, but a hole in the
// Cartesian plane, no way to limit it
return new ExtractGeometryFilterVisitorResult(
infinity(),
null);
}
开发者ID:locationtech,项目名称:geowave,代码行数:11,代码来源:ExtractGeometryFilterVisitor.java
示例8: visit
import org.opengis.filter.spatial.Disjoint; //导入依赖的package包/类
@Override
public Object visit(
final Disjoint filter,
final Object extraData ) {
if (!usesProperty(filter)) {
return Filter.INCLUDE;
}
return super.visit(
filter,
extraData);
}
开发者ID:locationtech,项目名称:geowave,代码行数:12,代码来源:PropertyIgnoringFilterVisitor.java
示例9: visitBinarySpatialOperator
import org.opengis.filter.spatial.Disjoint; //导入依赖的package包/类
void visitBinarySpatialOperator(BinarySpatialOperator filter, Expression e1, Expression e2,
boolean swapped, Object extraData) throws IOException {
String closingParenthesis = ")";
if (filter instanceof Equals) {
out.write("Equals");
} else if (filter instanceof Disjoint) {
out.write("NOT (\"Intersect\"");
closingParenthesis += ")";
} else if (filter instanceof Intersects || filter instanceof BBOX) {
out.write("\"Intersect\"");
} else if (filter instanceof Crosses) {
out.write("Crosses");
} else if (filter instanceof Within) {
if(swapped)
out.write("Contains");
else
out.write("Within");
} else if (filter instanceof Contains) {
if(swapped)
out.write("Within");
else
out.write("Contains");
} else if (filter instanceof Overlaps) {
out.write("Overlaps");
} else if (filter instanceof Touches) {
out.write("Touches");
} else {
throw new RuntimeException("Unsupported filter type " + filter.getClass());
}
out.write("(");
e1.accept(delegate, extraData);
out.write(", ");
e2.accept(delegate, extraData);
out.write(closingParenthesis);
}
开发者ID:DennisPallett,项目名称:gt-jdbc-monetdb,代码行数:39,代码来源:FilterToSqlHelper.java
示例10: visit
import org.opengis.filter.spatial.Disjoint; //导入依赖的package包/类
public Object visit(Disjoint filter, Object extraData) {
return visitBinarySpatialOperator((BinarySpatialOperator)filter, extraData);
}
开发者ID:ngageoint,项目名称:elasticgeo,代码行数:4,代码来源:FilterToElastic.java
示例11: visit
import org.opengis.filter.spatial.Disjoint; //导入依赖的package包/类
@Override
public Object visit(Disjoint filter, Object extraData) {
return visitBinarySpatialOperator((BinarySpatialOperator)filter, extraData);
}
开发者ID:DennisPallett,项目名称:gt-jdbc-monetdb-simple,代码行数:5,代码来源:FilterToSQL.java
示例12: visit
import org.opengis.filter.spatial.Disjoint; //导入依赖的package包/类
@Override
public Object visit(
final Disjoint filter,
final Object data ) {
return new TemporalConstraints();
}
开发者ID:locationtech,项目名称:geowave,代码行数:7,代码来源:ExtractTimeFilterVisitor.java
示例13: visit
import org.opengis.filter.spatial.Disjoint; //导入依赖的package包/类
@Override
public Object visit(
final Disjoint filter,
final Object data ) {
return new PropertyConstraintSet();
}
开发者ID:locationtech,项目名称:geowave,代码行数:7,代码来源:PropertyFilterVisitor.java
示例14: createFilterCapabilities
import org.opengis.filter.spatial.Disjoint; //导入依赖的package包/类
public static FilterCapabilities createFilterCapabilities(boolean encodeFunctions) {
FilterCapabilities caps = new FilterCapabilities();
caps.addAll(SQLDialect.BASE_DBMS_CAPABILITIES);
// adding the spatial filters support
caps.addType(BBOX.class);
caps.addType(Contains.class);
caps.addType(Crosses.class);
caps.addType(Disjoint.class);
caps.addType(Equals.class);
caps.addType(Intersects.class);
caps.addType(Overlaps.class);
caps.addType(Touches.class);
caps.addType(Within.class);
caps.addType(DWithin.class);
caps.addType(Beyond.class);
//temporal filters
caps.addType(After.class);
caps.addType(Before.class);
caps.addType(Begins.class);
caps.addType(BegunBy.class);
caps.addType(During.class);
caps.addType(TOverlaps.class);
caps.addType(Ends.class);
caps.addType(EndedBy.class);
caps.addType(TEquals.class);
if(encodeFunctions) {
// add support for string functions
caps.addType(FilterFunction_strConcat.class);
caps.addType(FilterFunction_strEndsWith.class);
caps.addType(FilterFunction_strStartsWith.class);
caps.addType(FilterFunction_strEqualsIgnoreCase.class);
caps.addType(FilterFunction_strIndexOf.class);
caps.addType(FilterFunction_strLength.class);
caps.addType(FilterFunction_strToLowerCase.class);
caps.addType(FilterFunction_strToUpperCase.class);
caps.addType(FilterFunction_strReplace.class);
caps.addType(FilterFunction_strSubstring.class);
caps.addType(FilterFunction_strSubstringStart.class);
caps.addType(FilterFunction_strTrim.class);
caps.addType(FilterFunction_strTrim2.class);
// add support for math functions
caps.addType(FilterFunction_abs.class);
caps.addType(FilterFunction_abs_2.class);
caps.addType(FilterFunction_abs_3.class);
caps.addType(FilterFunction_abs_4.class);
caps.addType(FilterFunction_ceil.class);
caps.addType(FilterFunction_floor.class);
}
return caps;
}
开发者ID:DennisPallett,项目名称:gt-jdbc-monetdb,代码行数:56,代码来源:FilterToSqlHelper.java
示例15: visitComparisonSpatialOperator
import org.opengis.filter.spatial.Disjoint; //导入依赖的package包/类
void visitComparisonSpatialOperator(BinarySpatialOperator filter,
PropertyName property, Literal geometry, boolean swapped, Object extraData)
throws IOException {
// if geography case, sanitize geometry first
if(isCurrentGeography()) {
geometry = clipToWorld(geometry);
if(isWorld(geometry)) {
// nothing to filter in this case
out.write(" TRUE ");
return;
} else if(isEmpty(geometry)) {
if(!(filter instanceof Disjoint)) {
out.write(" FALSE ");
} else {
out.write(" TRUE ");
}
return;
}
}
// add && filter if possible
if(!(filter instanceof Disjoint)) {
out.write("mbroverlaps(mbr(");
property.accept(delegate, extraData);
out.write("), mbr(");
geometry.accept(delegate, extraData);
out.write("))");
out.write(" AND ");
}
/* if(!(filter instanceof Disjoint)) {
out.write("Overlaps(");
property.accept(delegate, extraData);
out.write(", ");
geometry.accept(delegate, extraData);
out.write(")");
out.write(" AND ");
}*/
visitBinarySpatialOperator(filter, (Expression)property, (Expression)geometry, swapped, extraData);
}
开发者ID:DennisPallett,项目名称:gt-jdbc-monetdb,代码行数:46,代码来源:FilterToSqlHelper.java
示例16: visit
import org.opengis.filter.spatial.Disjoint; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
public Object visit(Disjoint filter, Object userData) {
throw new UnsupportedOperationException("visit(Disjoint filter, Object userData)");
}
开发者ID:geomajas,项目名称:geomajas-project-server,代码行数:6,代码来源:CriteriaVisitor.java
注:本文中的org.opengis.filter.spatial.Disjoint类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论