org.geotools.filter.spatial
Class BBOXImpl

java.lang.Object
  extended by org.geotools.filter.FilterAbstract
      extended by org.geotools.filter.AbstractFilter
          extended by org.geotools.filter.BinaryComparisonAbstract
              extended by org.geotools.filter.GeometryFilterImpl
                  extended by org.geotools.filter.spatial.AbstractPreparedGeometryFilter
                      extended by org.geotools.filter.spatial.BBOXImpl
All Implemented Interfaces:
FilterType, GeometryFilter, org.opengis.filter.BinaryComparisonOperator, org.opengis.filter.Filter, org.opengis.filter.spatial.BBOX, org.opengis.filter.spatial.BinarySpatialOperator, org.opengis.filter.spatial.SpatialOperator

public class BBOXImpl
extends AbstractPreparedGeometryFilter
implements org.opengis.filter.spatial.BBOX


Nested Class Summary
 
Nested classes/interfaces inherited from class org.geotools.filter.spatial.AbstractPreparedGeometryFilter
AbstractPreparedGeometryFilter.Literals
 
Field Summary
 
Fields inherited from class org.geotools.filter.spatial.AbstractPreparedGeometryFilter
cacheValue, leftPreppedGeom, literals, rightPreppedGeom
 
Fields inherited from class org.geotools.filter.BinaryComparisonAbstract
expression1, expression2
 
Fields inherited from class org.geotools.filter.AbstractFilter
filterType, permissiveConstruction
 
Fields inherited from class org.geotools.filter.FilterAbstract
factory
 
Fields inherited from interface org.opengis.filter.spatial.BBOX
NAME
 
Fields inherited from interface org.opengis.filter.Filter
EXCLUDE, INCLUDE
 
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
BBOXImpl(org.opengis.filter.FilterFactory factory, org.opengis.filter.expression.Expression e1, org.opengis.filter.expression.Expression e2)
           
BBOXImpl(FilterFactoryImpl factory, org.opengis.filter.expression.Expression name, double minx, double miny, double maxx, double maxy, java.lang.String srs)
           
 
Method Summary
 java.lang.Object accept(org.opengis.filter.FilterVisitor visitor, java.lang.Object extraData)
          Subclass should override, default implementation just returns extraData
protected  boolean basicEvaluate(com.vividsolutions.jts.geom.Geometry left, com.vividsolutions.jts.geom.Geometry right)
          Performs the calculation on the two geometries.
 boolean evaluate(java.lang.Object feature)
           
 double getMaxX()
           
 double getMaxY()
           
 double getMinX()
           
 double getMinY()
           
 java.lang.String getPropertyName()
           
 java.lang.String getSRS()
           
 void setExpression1(org.opengis.filter.expression.Expression expression)
           
 void setExpression2(org.opengis.filter.expression.Expression expression)
           
 void setMaxX(double maxx)
          Deprecated. use the constructor or setExpression2
 void setMaxY(double maxy)
          Deprecated. use the constructor or setExpression2
 void setMinX(double minx)
          Deprecated. use the constructor or setExpression2
 void setMinY(double miny)
          Deprecated. use the constructor or setExpression2
 void setPropertyName(java.lang.String propertyName)
           
 void setSRS(java.lang.String srs)
          Deprecated. use the constructor or setExpression2
 
Methods inherited from class org.geotools.filter.GeometryFilterImpl
addLeftGeometry, addRightGeometry, equals, evaluate, getLeftGeometry, getLeftGeometry, getRightGeometry, getRightGeometry, hashCode, toString, validate
 
Methods inherited from class org.geotools.filter.BinaryComparisonAbstract
and, comparable, eval, getExpression1, getExpression2, isMatchingCase, not, or
 
Methods inherited from class org.geotools.filter.AbstractFilter
accept, contains, getFilterType, isCompareFilter, isGeometryDistanceFilter, isGeometryFilter, isLogicFilter, isMathFilter, isSimpleFilter
 
Methods inherited from class org.geotools.filter.FilterAbstract
accepts, eval, eval, eval
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.opengis.filter.spatial.BinarySpatialOperator
getExpression1, getExpression2
 
Methods inherited from interface org.geotools.filter.GeometryFilter
contains
 
Methods inherited from interface org.geotools.filter.Filter
accept, and, getFilterType, not, or
 

Constructor Detail

BBOXImpl

public BBOXImpl(org.opengis.filter.FilterFactory factory,
                org.opengis.filter.expression.Expression e1,
                org.opengis.filter.expression.Expression e2)

BBOXImpl

public BBOXImpl(FilterFactoryImpl factory,
                org.opengis.filter.expression.Expression name,
                double minx,
                double miny,
                double maxx,
                double maxy,
                java.lang.String srs)
Method Detail

getPropertyName

public java.lang.String getPropertyName()
Specified by:
getPropertyName in interface org.opengis.filter.spatial.BBOX

setPropertyName

public void setPropertyName(java.lang.String propertyName)

getSRS

public java.lang.String getSRS()
Specified by:
getSRS in interface org.opengis.filter.spatial.BBOX

setSRS

public void setSRS(java.lang.String srs)
Deprecated. use the constructor or setExpression2


getMinX

public double getMinX()
Specified by:
getMinX in interface org.opengis.filter.spatial.BBOX

setMinX

public void setMinX(double minx)
Deprecated. use the constructor or setExpression2


getMinY

public double getMinY()
Specified by:
getMinY in interface org.opengis.filter.spatial.BBOX

setMinY

public void setMinY(double miny)
Deprecated. use the constructor or setExpression2


getMaxX

public double getMaxX()
Specified by:
getMaxX in interface org.opengis.filter.spatial.BBOX

setMaxX

public void setMaxX(double maxx)
Deprecated. use the constructor or setExpression2


getMaxY

public double getMaxY()
Specified by:
getMaxY in interface org.opengis.filter.spatial.BBOX

setMaxY

public void setMaxY(double maxy)
Deprecated. use the constructor or setExpression2


evaluate

public boolean evaluate(java.lang.Object feature)
Specified by:
evaluate in interface org.opengis.filter.Filter

basicEvaluate

protected boolean basicEvaluate(com.vividsolutions.jts.geom.Geometry left,
                                com.vividsolutions.jts.geom.Geometry right)
Description copied from class: AbstractPreparedGeometryFilter
Performs the calculation on the two geometries. This is used to calculate the cached value in the case that both geometries are Literals. But in practice it is useful to extract this functionality into its own method.

Specified by:
basicEvaluate in class AbstractPreparedGeometryFilter
Parameters:
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)
Returns:
true if the filter evaluates to true for the two geometries

accept

public java.lang.Object accept(org.opengis.filter.FilterVisitor visitor,
                               java.lang.Object extraData)
Description copied from class: FilterAbstract
Subclass should override, default implementation just returns extraData

Specified by:
accept in interface org.opengis.filter.Filter
Overrides:
accept in class FilterAbstract

setExpression1

public void setExpression1(org.opengis.filter.expression.Expression expression)
Overrides:
setExpression1 in class AbstractPreparedGeometryFilter

setExpression2

public void setExpression2(org.opengis.filter.expression.Expression expression)
Overrides:
setExpression2 in class AbstractPreparedGeometryFilter


Copyright © 1996-2010 Geotools. All Rights Reserved.