本文整理汇总了Java中org.opengis.filter.spatial.Beyond类的典型用法代码示例。如果您正苦于以下问题:Java Beyond类的具体用法?Java Beyond怎么用?Java Beyond使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Beyond类属于org.opengis.filter.spatial包,在下文中一共展示了Beyond类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: visitDistanceSpatialOperator
import org.opengis.filter.spatial.Beyond; //导入依赖的package包/类
protected void visitDistanceSpatialOperator(DistanceBufferOperator filter,
PropertyName property, Literal geometry, boolean swapped,
Object extraData) {
property.accept(delegate, extraData);
key = (String) delegate.field;
geometry.accept(delegate, extraData);
final Geometry geo = delegate.currentGeometry;
lat = geo.getCentroid().getY();
lon = geo.getCentroid().getX();
final double inputDistance = filter.getDistance();
final String inputUnits = filter.getDistanceUnits();
distance = Double.valueOf(toMeters(inputDistance, inputUnits));
delegate.queryBuilder = ImmutableMap.of("bool", ImmutableMap.of("must", MATCH_ALL,
"filter", ImmutableMap.of("geo_distance",
ImmutableMap.of("distance", distance+SI.METER.toString(), key, ImmutableList.of(lon,lat)))));
if ((filter instanceof DWithin && swapped)
|| (filter instanceof Beyond && !swapped)) {
delegate.queryBuilder = ImmutableMap.of("bool", ImmutableMap.of("must_not", delegate.queryBuilder));
}
}
示例2: visitDistanceSpatialOperator
import org.opengis.filter.spatial.Beyond; //导入依赖的package包/类
void visitDistanceSpatialOperator(DistanceBufferOperator filter,
PropertyName property, Literal geometry, boolean swapped,
Object extraData) throws IOException {
if ((filter instanceof DWithin && !swapped)
|| (filter instanceof Beyond && swapped)) {
out.write("ST_DWithin(");
property.accept(delegate, extraData);
out.write(",");
geometry.accept(delegate, extraData);
out.write(",");
out.write(toMeters(filter.getDistance(), filter.getDistanceUnits()));
out.write(")");
}
if ((filter instanceof DWithin && swapped)
|| (filter instanceof Beyond && !swapped)) {
out.write("Distance(");
property.accept(delegate, extraData);
out.write(",");
geometry.accept(delegate, extraData);
out.write(") > ");
out.write(Double.toString(filter.getDistance()));
}
}
示例3: createFilterCapabilities
import org.opengis.filter.spatial.Beyond; //导入依赖的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;
}
示例4: testBeyondFilter
import org.opengis.filter.spatial.Beyond; //导入依赖的package包/类
@Test
public void testBeyondFilter() throws Exception {
init();
FilterFactory2 ff = (FilterFactory2) dataStore.getFilterFactory();
GeometryFactory gf = new GeometryFactory();
PackedCoordinateSequenceFactory sf = new PackedCoordinateSequenceFactory();
Point ls = gf.createPoint(sf.create(new double[] { 0, 0 }, 2));
Beyond f = ff.beyond(ff.property("geo"), ff.literal(ls), 1, SI.METRE.getSymbol());
SimpleFeatureCollection features = featureSource.getFeatures(f);
assertEquals(9, features.size());
}
示例5: testDBeyondFilter
import org.opengis.filter.spatial.Beyond; //导入依赖的package包/类
@Test
public void testDBeyondFilter() throws CQLException {
Beyond filter = (Beyond) ECQL.toFilter("BEYOND(\"geo_point\", POINT(0 1.1), 1.0, meters)");
Map<String,Object> expected = ImmutableMap.of("bool", ImmutableMap.of("must_not", ImmutableMap.of("bool",
ImmutableMap.of("must", MATCH_ALL, "filter", ImmutableMap.of("geo_distance", ImmutableMap.of("distance", "1.0m",
"geo_point", ImmutableList.of(0.,1.1)))))));
builder.visit(filter, null);
assertTrue(builder.createFilterCapabilities().fullySupports(filter));
assertEquals(expected, builder.getQueryBuilder());
}
示例6: visit
import org.opengis.filter.spatial.Beyond; //导入依赖的package包/类
@Override
public Object visit(
final Beyond filter,
final Object data ) {
// beyond a certain distance from a finite object, no way to limit it
return new ExtractGeometryFilterVisitorResult(
infinity(),
null);
}
示例7: visit
import org.opengis.filter.spatial.Beyond; //导入依赖的package包/类
@Override
public Object visit(
final Beyond filter,
final Object extraData ) {
if (!usesProperty(filter)) {
return Filter.INCLUDE;
}
return super.visit(
filter,
extraData);
}
示例8: visit
import org.opengis.filter.spatial.Beyond; //导入依赖的package包/类
public Object visit(Beyond filter, Object extraData) {
return visitBinarySpatialOperator((BinarySpatialOperator)filter, extraData);
}
示例9: visit
import org.opengis.filter.spatial.Beyond; //导入依赖的package包/类
@Override
public Object visit(Beyond filter, Object extraData) {
return visitBinarySpatialOperator((BinarySpatialOperator)filter, extraData);
}
示例10: visit
import org.opengis.filter.spatial.Beyond; //导入依赖的package包/类
@Override
public Object visit(
final Beyond filter,
final Object data ) {
return new TemporalConstraints();
}
示例11: visit
import org.opengis.filter.spatial.Beyond; //导入依赖的package包/类
@Override
public Object visit(
final Beyond filter,
final Object data ) {
return new PropertyConstraintSet();
}
示例12: createFilterCapabilities
import org.opengis.filter.spatial.Beyond; //导入依赖的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;
}
示例13: visit
import org.opengis.filter.spatial.Beyond; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
public Object visit(Beyond filter, Object userData) {
throw new UnsupportedOperationException("visit(Beyond filter, Object userData)");
}