org.geotools.filter
Interface GeometryFilter

All Superinterfaces:
org.opengis.filter.spatial.BinarySpatialOperator, Filter, org.opengis.filter.Filter, FilterType, org.opengis.filter.spatial.SpatialOperator
All Known Subinterfaces:
GeometryDistanceFilter
All Known Implementing Classes:
CartesianDistanceFilter, GeometryFilterImpl

public interface GeometryFilter
extends Filter, org.opengis.filter.spatial.BinarySpatialOperator

Implements a geometry filter.

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.

Version:
$Id: GeometryFilter.java 18021 2006-02-14 20:36:18Z jdeolive $
Author:
Rob Hranac, TOPP, Chris Holmes, TOPP

Field Summary
 
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
 
Method Summary
 void addLeftGeometry(Expression leftGeometry)
          Deprecated. use BinarySpatialOperator#setExpression1(Expression)
 void addRightGeometry(Expression rightGeometry)
          Deprecated. use BinarySpatialOperator#setExpression2(Expression)
 boolean contains(Feature feature)
          Determines whether the given feature's geometry passes the geometric relationship of this filter.
 Expression getLeftGeometry()
          Deprecated. use BinarySpatialOperator.getExpression1().
 Expression getRightGeometry()
          Deprecated. use BinarySpatialOperator.getExpression2().
 
Methods inherited from interface org.geotools.filter.Filter
accept, and, evaluate, getFilterType, not, or
 
Methods inherited from interface org.opengis.filter.Filter
accept, evaluate
 
Methods inherited from interface org.opengis.filter.spatial.BinarySpatialOperator
getExpression1, getExpression2
 

Method Detail

addRightGeometry

public void addRightGeometry(Expression rightGeometry)
                      throws IllegalFilterException
Deprecated. use BinarySpatialOperator#setExpression2(Expression)

Adds the 'right' value to this filter.

Parameters:
rightGeometry - Expression for 'right' value.
Throws:
IllegalFilterException - Filter is not internally consistent.

addLeftGeometry

public void addLeftGeometry(Expression leftGeometry)
                     throws IllegalFilterException
Deprecated. use BinarySpatialOperator#setExpression1(Expression)

Adds the 'left' value to this filter.

Parameters:
leftGeometry - Expression for 'left' value.
Throws:
IllegalFilterException - Filter is not internally consistent.
Task:
REVISIT: make all filters immutable.

contains

public boolean contains(Feature feature)
Determines whether the given feature's geometry passes the geometric relationship of this filter.

Specified by:
contains in interface Filter
Parameters:
feature - the feature to inspect.
Returns:
whether the feature meets the conditions of filtering imposed by this geometry filter.

getRightGeometry

public Expression getRightGeometry()
Deprecated. use BinarySpatialOperator.getExpression2().

Retrieves the expression on the right side of the spatial comparison.

Returns:
the geometry expression on the right.

getLeftGeometry

public Expression getLeftGeometry()
Deprecated. use BinarySpatialOperator.getExpression1().

Retrieves the expression on the left side of the spatial comparison.

Returns:
the geometry expression on the left.


Copyright © GeoTools. All Rights Reserved.