deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official

org.deegree.filter.spatial
Class SpatialOperator

java.lang.Object
  extended by org.deegree.filter.spatial.SpatialOperator
All Implemented Interfaces:
Operator
Direct Known Subclasses:
BBOX, Beyond, Contains, Crosses, Disjoint, DWithin, Equals, Intersects, Overlaps, Touches, Within

public abstract class SpatialOperator
extends Object
implements Operator

Defines a topological predicate that can be evaluated on Geometry valued objects.

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

Nested Class Summary
static class SpatialOperator.SubType
          Convenience enum type for discriminating the different SpatialOperator types.
 
Nested classes/interfaces inherited from interface org.deegree.filter.Operator
Operator.Type
 
Constructor Summary
SpatialOperator()
           
 
Method Summary
protected  Geometry checkGeometryOrNull(Object value)
          Performs a checked cast to Geometry.
protected  Geometry getCompatibleGeometry(Geometry param, Geometry literal)
          Returns a version of the given geometry literal that has the same srs as the given geometry parameter.
abstract  Object[] getParams()
           
 SpatialOperator.SubType getSubType()
          Returns the type of spatial operator.
 Operator.Type getType()
          Always returns Operator.Type#SPATIAL (for SpatialOperator instances).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.deegree.filter.Operator
evaluate, toString
 

Constructor Detail

SpatialOperator

public SpatialOperator()
Method Detail

getType

public Operator.Type getType()
Always returns Operator.Type#SPATIAL (for SpatialOperator instances).

Specified by:
getType in interface Operator
Returns:
Operator.Type#SPATIAL

getSubType

public SpatialOperator.SubType getSubType()
Returns the type of spatial operator. Use this to safely determine the subtype of SpatialOperator.

Returns:
type of spatial operator

checkGeometryOrNull

protected Geometry checkGeometryOrNull(Object value)
                                throws FilterEvaluationException
Performs a checked cast to Geometry. If the given value is neither null nor a Geometry instance, a corresponding FilterEvaluationException is thrown.

Parameters:
value -
Returns:
the very same value (if it is a Geometry or null)
Throws:
FilterEvaluationException - if the value is neither null nor a Geometry

getCompatibleGeometry

protected Geometry getCompatibleGeometry(Geometry param,
                                         Geometry literal)
                                  throws FilterEvaluationException
Returns a version of the given geometry literal that has the same srs as the given geometry parameter.

Parameters:
param - geometry parameter, must not be null
literal - geometry literal, must not be null
Returns:
literal geometry with the same srs as the parameter geometry
Throws:
FilterEvaluationException - if the transformation failed

getParams

public abstract Object[] getParams()

deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org

]]>