Interface DistanceOperator<R>

Type Parameters:
R - the type of resources (e.g. Feature) to filter.
All Superinterfaces:
Filter<R>, Predicate<R>, SpatialOperator<R>

@UML(identifier="DistanceOperator", specification=ISO_19143) public interface DistanceOperator<R> extends SpatialOperator<R>
Spatial operator that checks that one geometry satisfies some relation to a buffer around another geometry. This could be used to find, for example, all the geometries that come within 10 meters of a river.
Since:
3.1
  • Method Details

    • getOperatorType

      Returns the nature of the operator. A standard set of spatial operators is within and beyond.
      Specified by:
      getOperatorType in interface Filter<R>
      Specified by:
      getOperatorType in interface SpatialOperator<R>
      Returns:
      the nature of the operator.
    • getExpressions

      @UML(identifier="valueReference", obligation=MANDATORY, specification=ISO_19143) List<Expression<? super R,?>> getExpressions()
      Returns the two expressions to be evaluated by this operator. The result of evaluating the two first expressions should be Geometry instances. The list content is as below:
      1. The first expression should be a ValueReference evaluating to a Geometry. But it may also evaluate to a Feature if the operator shall be applied to the geometric values of all the spatial properties of the resource. In this case, the operator evaluates to true if all tested spatial property values fulfill the spatial relationship implied by the operator.
      2. The second expression should be a literal evaluating to the same geometry than the one returned by getGeometry().
      3. The third expression should be a literal evaluating to the same measure than the one returned by getDistance().
      Specified by:
      getExpressions in interface Filter<R>
      Returns:
      a list of size 3 containing the expression to be evaluated, the geometry and the distance in that order.
      Departure from OGC/ISO abstract specification:
      Departure for harmonization between different specifications ISO 19143 defines a single expression (valueReference) completed by 2 parameters (geometry and distance). GeoAPI puts the expression and the 2 parameters in a single list for enabling access to all parameters in a more generic wayFilter#getExpressions().
    • getGeometry

      The literal geometry from which distances are measured.
      Returns:
      the geometry from which distances are measured.
    • getDistance

      @UML(identifier="distance", obligation=MANDATORY, specification=ISO_19143) Quantity<Length> getDistance()
      Returns the buffer distance around the geometry that will be used when comparing features' geometries. An implementation may throw an exception if the units of measurement differ from the units of the coordinate system of its geometry or the feature's geometry.
      Returns:
      the buffer distance around the geometry of the second expression.