|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.geotools.filter.AbstractFilter
org.geotools.filter.AbstractFilterImpl
org.geotools.filter.GeometryFilterImpl
org.geotools.filter.CartesianDistanceFilter
Defines geometry filters with a distance element.
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.
Field Summary |
Fields inherited from class org.geotools.filter.GeometryFilterImpl |
leftGeometry, rightGeometry |
Fields inherited from class org.geotools.filter.AbstractFilter |
filterType, permissiveConstruction |
Fields inherited from interface org.geotools.filter.Filter |
ALL, NONE |
Fields inherited from interface org.geotools.filter.FilterType |
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, NULL |
Constructor Summary | |
protected |
CartesianDistanceFilter(short filterType)
Constructor which flags the operator as between. |
Method Summary | |
void |
accept(FilterVisitor visitor)
Used by FilterVisitors to perform some action on this filter instance. |
boolean |
contains(Feature feature)
Determines whether or not a given feature is 'inside' this filter. |
boolean |
equals(java.lang.Object oFilter)
Returns true if the passed in object is the same as this filter. |
double |
getDistance()
Gets the distance allowed by this filter. |
int |
hashCode()
Override of hashCode method. |
void |
setDistance(double distance)
Sets the distance allowed by this filter. |
java.lang.String |
toString()
Returns a string representation of this filter. |
Methods inherited from class org.geotools.filter.GeometryFilterImpl |
addLeftGeometry, addRightGeometry, getLeftGeometry, getRightGeometry |
Methods inherited from class org.geotools.filter.AbstractFilterImpl |
and, not, or |
Methods inherited from class org.geotools.filter.AbstractFilter |
getFilterType, isCompareFilter, isGeometryDistanceFilter, isGeometryFilter, isLogicFilter, isMathFilter, isSimpleFilter |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.geotools.filter.GeometryFilter |
addLeftGeometry, addRightGeometry, getLeftGeometry, getRightGeometry |
Methods inherited from interface org.geotools.filter.Filter |
and, getFilterType, not, or |
Constructor Detail |
protected CartesianDistanceFilter(short filterType) throws IllegalFilterException
filterType
- The type of filter to create - dwithin and beyond are
allowed.
IllegalFilterException
- If a filter other than dwithin or beyond
is attempted.Method Detail |
public void setDistance(double distance)
setDistance
in interface GeometryDistanceFilter
distance
- the length beyond which this filter is valid or not.public double getDistance()
getDistance
in interface GeometryDistanceFilter
public boolean contains(Feature feature)
contains
in interface GeometryDistanceFilter
contains
in class GeometryFilterImpl
feature
- Specified feature to examine.
public java.lang.String toString()
toString
in class GeometryFilterImpl
public boolean equals(java.lang.Object oFilter)
equals
in interface GeometryDistanceFilter
equals
in class GeometryFilterImpl
oFilter
- The filter to test equality against.
public int hashCode()
hashCode
in class GeometryFilterImpl
public void accept(FilterVisitor visitor)
accept
in interface Filter
accept
in class GeometryFilterImpl
visitor
- The visitor which requires access to this filter, the
method must call visitor.visit(this);
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |