public abstract class CartesianDistanceFilter extends GeometryFilterImpl implements DistanceBufferOperator
These filters are defined in the filter spec by the DistanceBufferType, which contains an additioinal field for a distance. The two filters that use the distance buffer type are Beyond and DWithin.
From the spec: The spatial operators DWithin and Beyond test whether the value of a geometric property is within or beyond a specified distance of the specified literal geometric value. Distance values are expressed using the Distance element.
For now this code does not take into account the units of distance, we will assume that the filter units are the same as the geometry being filtered, and that they are cartesian.
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 |
CartesianDistanceFilter()
Deprecated.
|
protected |
CartesianDistanceFilter(Expression e1,
Expression e2) |
protected |
CartesianDistanceFilter(Expression e1,
Expression e2,
MultiValuedFilter.MatchAction matchAction) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object oFilter)
Returns true if the passed in object is the same as this filter.
|
double |
getDistance()
Gets the distance allowed by this filter.
|
String |
getDistanceUnits()
Gets the units of measure that can be used to interpret the distance value held by this
object.
|
int |
hashCode()
Override of hashCode method.
|
void |
setDistance(double distance)
Sets the distance allowed by this filter.
|
void |
setUnits(String units) |
String |
toString()
Returns a string representation of this filter.
|
evaluate, evaluateInternal, getGeometries, getMatchAction
comparable, eval, eval, getExpression1, getExpression2, isMatchingCase, setExpression1, setExpression2
isCompareFilter, isGeometryDistanceFilter, isGeometryFilter, isLogicFilter, isMathFilter, isSimpleFilter
accepts, eval, eval
getExpression1, getExpression2
getMatchAction
@Deprecated protected CartesianDistanceFilter()
protected CartesianDistanceFilter(Expression e1, Expression e2)
protected CartesianDistanceFilter(Expression e1, Expression e2, MultiValuedFilter.MatchAction matchAction)
public void setDistance(double distance)
distance
- the length beyond which this filter is valid or not.public double getDistance()
getDistance
in interface DistanceBufferOperator
public String getDistanceUnits()
DistanceBufferOperator
getDistanceUnits
in interface DistanceBufferOperator
public void setUnits(String units)
public String toString()
toString
in class GeometryFilterImpl
public boolean equals(Object oFilter)
equals
in class GeometryFilterImpl
oFilter
- The filter to test equality against.public int hashCode()
hashCode
in class GeometryFilterImpl
Copyright © 1996–2019 Geotools. All rights reserved.