Class TLcdOGCBinarySpatialOperator

java.lang.Object
com.luciad.datamodel.TLcdDataObject
com.luciad.ogc.filter.model.TLcdOGCBinarySpatialOperator
All Implemented Interfaces:
ILcdDataObject, ILcdGenericExpression, ILcdOGCCondition, ILcdCloneable, ILcdDeepCloneable, Cloneable

public class TLcdOGCBinarySpatialOperator extends TLcdDataObject implements ILcdOGCCondition
This class represents the elements of type <ogc:BinarySpatialOpType>. Namely:
  • <ogc:Equals>
  • <ogc:Disjoint>
  • <ogc:Touches>
  • <ogc:Within>
  • <ogc:Overlaps>
  • <ogc:Crosses>
  • <ogc:Intersects>
  • <ogc:Contains>
According to the OGC Filter specification, the spatial operator determines whether its geometric arguments satisfy the stated spatial relationship. The operator evaluates to TRUE if the spatial relationship is satisfied. Otherwise the operator evaluates to FALSE.

A TLcdOGCBinarySpatialOperator instance is composed of a spatial relationship type that must be one of the constants defined in this class, a TLcdOGCPropertyName instance that identifies the geometric property to be considered in the spatial relationship, an ILcdShape instance that indicates the geometry to be considered in the spatial relationship and a ILcdGeoReference that indicates the spatial reference of the given shape in case the shape doesn't contain one.

  • Field Details

    • DISJOINT

      public static final int DISJOINT
      Spatial relationship type that corresponds to the <ogc:Disjoint> element.
      See Also:
    • CROSSES

      public static final int CROSSES
      Spatial relationship type that corresponds to the <ogc:Crosses> element.
      See Also:
    • OVERLAPS

      public static final int OVERLAPS
      Spatial relationship type that corresponds to the <ogc:Overlaps> element.
      See Also:
    • WITHIN

      public static final int WITHIN
      Spatial relationship type that corresponds to the <ogc:Within> element.
      See Also:
    • INTERSECTS

      public static final int INTERSECTS
      Spatial relationship type that corresponds to the <ogc:Intersects> element.
      See Also:
    • TOUCHES

      public static final int TOUCHES
      Spatial relationship type that corresponds to the <ogc:Touches> element.
      See Also:
    • CONTAINS

      public static final int CONTAINS
      Spatial relationship type that corresponds to the <ogc:Contains> element.
      See Also:
    • EQUALS

      public static final int EQUALS
      Spatial relationship type that corresponds to the <ogc:Equals> element.
      See Also:
  • Constructor Details

    • TLcdOGCBinarySpatialOperator

      public TLcdOGCBinarySpatialOperator()
      Default constructor.
    • TLcdOGCBinarySpatialOperator

      public TLcdOGCBinarySpatialOperator(int aType, TLcdOGCPropertyName aPropertyName, ILcdShape aShape, ILcdGeoReference aShapeGeoReference)

      Constructs an instance for a given spatial relationship type, a property name, a shape and a spatial reference.

      When evaluating a filter containing this condition, the shape will have to be transformed to the same reference as the shape under evaluation to perform the spatial test. When this conversion is not possible, evaluating the filter will result in an IllegalArgumentException. If you know the reference of the shapes you will be evaluating in advance, it is therefore recommended to construct this condition with a shape expressed in the same reference as the shapes you will be evaluating.

      Currently, we only support automatic conversion between references for point and bounds shapes.

      Parameters:
      aType - the type of the spatial relationship. It must be one of the constants of this class.
      aPropertyName - the property name that identifies the geometric property to be considered in the spatial relationship.
      aShape - the geometry to be considered in the spatial relationship.
      aShapeGeoReference - the spatial reference of the geometry in case it doesn't contain one.
  • Method Details

    • getType

      public int getType()
      Returns the type of the spatial relationship.
      Returns:
      the type of the spatial relationship. It will be one of the constants of this class.
    • setType

      public void setType(int aType)
      Sets the type of the spatial relationship.
      Parameters:
      aType - the type of the spatial relationship. It must be one of the constants of this class.
    • getPropertyName

      public TLcdOGCPropertyName getPropertyName()
      Gets the property name that identifies the geometric property to be considered in the spatial relationship.
      Returns:
      the property name that identifies the geometric property to be considered in the spatial relationship.
    • setPropertyName

      public void setPropertyName(TLcdOGCPropertyName aPropertyName)
      Sets the property name that identifies the geometric property to be considered in the spatial relationship.
      Parameters:
      aPropertyName - the property name that identifies the geometric property to be considered in the spatial relationship.
    • getShape

      public ILcdShape getShape()
      Gets the geometry to be considered in the spatial relationship.
      Returns:
      the geometry to be considered in the spatial relationship.
    • setShape

      public void setShape(ILcdShape aShape)

      Sets the geometry to be considered in the spatial relationship.

      When evaluating a filter containing this condition, the shape will have to be transformed to the same reference as the shape under evaluation to perform the spatial test. When this conversion is not possible, evaluating the filter will result in an IllegalArgumentException. If you know the reference of the shapes you will be evaluating in advance, it is therefore recommended to construct this condition with a shape expressed in the same reference as the shapes you will be evaluating.

      Currently, we only support automatic conversion between references for point and bounds shapes.

      Parameters:
      aShape - the geometry to be considered in the spatial relationship.
      See Also:
    • getShapeGeoReference

      public ILcdGeoReference getShapeGeoReference()
      Gets the spatial reference of the geometry.
      Returns:
      the spatial reference of the geometry.
    • setShapeGeoReference

      public void setShapeGeoReference(ILcdGeoReference aShapeGeoReference)

      Sets the spatial reference of the geometry.

      When evaluating a filter containing this condition, the shape will have to be transformed to the same reference as the shape under evaluation to perform the spatial test. When this conversion is not possible, evaluating the filter will result in an IllegalArgumentException. If you know the reference of the shapes you will be evaluating in advance, it is therefore recommended to construct this condition with a shape expressed in the same reference as the shapes you will be evaluating.

      Currently, we only support automatic conversion between references for point and bounds shapes.

      Parameters:
      aShapeGeoReference - the spatial reference of the geometry.
      See Also:
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class TLcdDataObject