public abstract class GeometryFilterImpl extends BinaryComparisonAbstract implements BinarySpatialOperator
This filter implements a relationship - of some sort - between two geometry expressions. Note that this comparison does not attempt to restict its expressions to be meaningful. This means that it considers itself a valid filter as long as it contains two geometry sub-expressions. It is also slightly less restrictive than the OGC Filter specification because it does not require that one sub-expression be an geometry attribute and the other be a geometry literal.
In other words, you may use this filter to compare two geometries in the same feature, such as: attributeA inside attributeB? You may also compare two literal geometries, although this is fairly meaningless, since it could be reduced (ie. it is always either true or false). This approach is very similar to that taken in the FilterCompare class.
MultiValuedFilter.MatchAction
Modifier and Type | Field and Description |
---|---|
protected MultiValuedFilter.MatchAction |
matchAction |
expression1, expression2
ALL, BETWEEN, COMPARE_EQUALS, COMPARE_GREATER_THAN, COMPARE_GREATER_THAN_EQUAL, COMPARE_LESS_THAN, COMPARE_LESS_THAN_EQUAL, COMPARE_NOT_EQUALS, FID, GEOMETRY_BBOX, GEOMETRY_BEYOND, GEOMETRY_CONTAINS, GEOMETRY_CROSSES, GEOMETRY_DISJOINT, GEOMETRY_DWITHIN, GEOMETRY_EQUALS, GEOMETRY_INTERSECTS, GEOMETRY_OVERLAPS, GEOMETRY_TOUCHES, GEOMETRY_WITHIN, LIKE, LOGIC_AND, LOGIC_NOT, LOGIC_OR, NONE, NULL
Modifier | Constructor and Description |
---|---|
protected |
GeometryFilterImpl()
Deprecated.
|
protected |
GeometryFilterImpl(Expression e1,
Expression e2) |
protected |
GeometryFilterImpl(Expression e1,
Expression e2,
MultiValuedFilter.MatchAction matchAction) |
protected |
GeometryFilterImpl(FilterFactory factory) |
protected |
GeometryFilterImpl(MultiValuedFilter.MatchAction matchAction) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj)
Compares this filter to the specified object.
|
boolean |
evaluate(Object feature)
Give an object, this method determines if the test(s) represented by this filter object
are passed.
|
protected abstract boolean |
evaluateInternal(Geometry left,
Geometry right)
Performs the calculation on the two geometries.
|
protected static Object |
getGeometries(Expression expr,
Object feature)
NC - support for multiple values Convenience method for returning expression as either a
geometry or a list of geometries.
|
MultiValuedFilter.MatchAction |
getMatchAction()
* Flag Controlling MatchAction property When one or more of the operands evaluates to
multiple values rather than a single value, which action should be taken?
|
int |
hashCode()
Override of hashCode method.
|
String |
toString()
Return this filter as a string.
|
comparable, eval, eval, getExpression1, getExpression2, isMatchingCase, setExpression1, setExpression2
isCompareFilter, isGeometryDistanceFilter, isGeometryFilter, isLogicFilter, isMathFilter, isSimpleFilter
accepts, eval, eval
getExpression1, getExpression2
protected MultiValuedFilter.MatchAction matchAction
@Deprecated protected GeometryFilterImpl() throws IllegalFilterException
IllegalFilterException
protected GeometryFilterImpl(MultiValuedFilter.MatchAction matchAction)
protected GeometryFilterImpl(Expression e1, Expression e2, MultiValuedFilter.MatchAction matchAction)
protected GeometryFilterImpl(FilterFactory factory)
protected GeometryFilterImpl(Expression e1, Expression e2)
protected static Object getGeometries(Expression expr, Object feature)
public String toString()
public boolean equals(Object obj)
public int hashCode()
public MultiValuedFilter.MatchAction getMatchAction()
MultiValuedFilter
ANY - if any of the possible combinations match, the result is true (aggregated OR) ALL - only if all of the possible combinations match, the result is true (aggregated AND) ONE - only if exactly one of the possible combinations match, the result is true (aggregated XOR)
getMatchAction
in interface MultiValuedFilter
getMatchAction
in class BinaryComparisonAbstract
public final boolean evaluate(Object feature)
Filter
This ability is used to allow Queries against both Features and and non spatial data (such as Record) and to express constraints on permissable data values.
protected abstract boolean evaluateInternal(Geometry left, Geometry right)
left
- the geometry on the left of the equations (the geometry obtained from evaluating
Expression1)right
- the geometry on the right of the equations (the geometry obtained from
evaluating Expression2)Copyright © 1996–2019 Geotools. All rights reserved.