org.deegree.filter.spatial
Class BBOX

java.lang.Object
  extended by org.deegree.filter.spatial.SpatialOperator
      extended by org.deegree.filter.spatial.BBOX
All Implemented Interfaces:
Operator

public class BBOX
extends SpatialOperator

SpatialOperator that checks for the intersection of the two geometry operands' envelopes.

Note that the first (@link Expression) argument may be omitted:

From Filter Encoding Implementation Specification 1.1: If the optional <PropertyName> element is not specified, the calling service must determine which spatial property is the spatial key and apply the BBOX operator accordingly. For feature types that has a single spatial property, this is a trivial matter. For feature types that have multiple spatial properties, the calling service either knows which spatial property is the spatial key or the calling service generates an exception indicating that the feature contains multiple spatial properties and the element must be specified.

Version:
$Revision:$, $Date:$
Author:
Markus Schneider , last edited by: $Author:$

Nested Class Summary
 
Nested classes/interfaces inherited from class org.deegree.filter.spatial.SpatialOperator
SpatialOperator.SubType
 
Nested classes/interfaces inherited from interface org.deegree.filter.Operator
Operator.Type
 
Field Summary
 
Fields inherited from class org.deegree.filter.spatial.SpatialOperator
propName
 
Constructor Summary
BBOX(Envelope param2)
          Creates a new BBOX instance which uses the default geometry property and the specified bounding box.
BBOX(Expression param1, Envelope param2)
          Creates a new BBOX instance which uses the specified geometry property and bounding box.
 
Method Summary
<T> boolean
evaluate(T obj, XPathEvaluator<T> xpathEvaluator)
          Determines the value of the boolean operator.
 Envelope getBoundingBox()
          Returns the envelope which is tested for intersection.
 Object[] getParams()
           
 ValueReference getPropName()
          Deprecated. use SpatialOperator.getParam1() instead
 String toString(String indent)
           
 
Methods inherited from class org.deegree.filter.spatial.SpatialOperator
checkGeometryOrNull, getCompatibleGeometry, getParam1, getSubType, getType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BBOX

public BBOX(Envelope param2)
Creates a new BBOX instance which uses the default geometry property and the specified bounding box.

Parameters:
param2 - bounding box argument for intersection testing, never null

BBOX

public BBOX(Expression param1,
            Envelope param2)
Creates a new BBOX instance which uses the specified geometry property and bounding box.

Parameters:
param1 -
param2 - bounding box argument for intersection testing, never null
Method Detail

getPropName

public ValueReference getPropName()
Deprecated. use SpatialOperator.getParam1() instead

Returns the name of the property to be tested for intersection.

Overrides:
getPropName in class SpatialOperator
Returns:
the name of the property, may be null (implies that the default geometry property of the object should be used)

getBoundingBox

public Envelope getBoundingBox()
Returns the envelope which is tested for intersection.

Returns:
the envelope, never null

evaluate

public <T> boolean evaluate(T obj,
                            XPathEvaluator<T> xpathEvaluator)
                 throws FilterEvaluationException
Description copied from interface: Operator
Determines the value of the boolean operator.

Type Parameters:
T - type of the context object
Parameters:
obj - object that the operator is evaluated upon, must not be null
xpathEvaluator - used for evaluation of XPath expressions, must not be null
Returns:
true, if the operator evaluates to true, false otherwise
Throws:
FilterEvaluationException - if the evaluation fails

toString

public String toString(String indent)

getParams

public Object[] getParams()
Specified by:
getParams in class SpatialOperator


Copyright © 2011. All Rights Reserved.