Class TLcdOGCDistanceBuffer

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

public class TLcdOGCDistanceBuffer extends TLcdDataObject implements ILcdOGCCondition
This class represents the elements of type <ogc:DistanceBufferType>. Namely:
  • <ogc:DWithin>
  • <ogc:Beyond>
According to the OGC Filter specification, the spatial operators DWithin and Beyond test whether the value of a geometric property is within or beyond a specified distance of the specified literal geometric value.

A TLcdOGCDistanceBuffer instance is composed of a spatial operator 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 test, an ILcdShape instance that indicates the geometry to be considered in the spatial test, a ILcdGeoReference that indicates the spatial reference of the given shape in case the shape doesn't contain one and a TLcdOGCDistance instance.

  • Field Details

    • DWITHIN

      public static final int DWITHIN
      Spatial test type that corresponds to the <ogc:DWithin> element.
      See Also:
    • BEYOND

      public static final int BEYOND
      Spatial test type that corresponds to the <ogc:Beyond> element.
      See Also:
  • Constructor Details

    • TLcdOGCDistanceBuffer

      public TLcdOGCDistanceBuffer()
      Default constructor.
    • TLcdOGCDistanceBuffer

      public TLcdOGCDistanceBuffer(int aType, TLcdOGCPropertyName aPropertyName, ILcdShape aShape, ILcdGeoReference aShapeGeoReference, TLcdOGCDistance aDistance)

      Creates an instance for a given for a given spatial test type, a property name, a shape, a spatial reference and a distance.

      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 test. 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 test.
      aShape - the geometry to be considered in the spatial test.
      aShapeGeoReference - the spatial reference of the geometry in case it doesn't contain one.
      aDistance - the distance to be considered in the spatial test.
  • Method Details

    • getType

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

      public void setType(int aType)
      Sets the spatial test type.
      Parameters:
      aType - the spatial test type. 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 test.
      Returns:
      the property name that identifies the geometric property to be considered in the spatial test.
    • setPropertyName

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

      public ILcdShape getShape()
      Gets the geometry to be considered in the spatial test.
      Returns:
      the geometry to be considered in the spatial test.
    • 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 in case it doesn't contain one.
      Returns:
      the spatial reference of the geometry in case it doesn't contain one.
    • 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:
    • getDistance

      public TLcdOGCDistance getDistance()
      Gets the distance to be considered in the spatial test.
      Returns:
      the distance to be considered in the spatial test.
    • setDistance

      public void setDistance(TLcdOGCDistance aDistance)
      Sets the distance to be considered in the spatial test.
      Parameters:
      aDistance - the distance to be considered in the spatial test.
    • 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