Interface BinarySpatialOperator<R>

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

@UML(identifier="BinarySpatialOperator", specification=ISO_19143) public interface BinarySpatialOperator<R> extends SpatialOperator<R>
Operator that tests whether two expressions that evaluate to geometric values satisfy the spatial relationship implied by the operator. The nature of the comparison is dependent on the operator type. A standard set of spatial operators is equal, disjoin, touches, within, overlaps, crosses, intersects, contains, beyond and BBOX.
Example: An operator of type SpatialOperatorName.OVERLAPS evaluates whether the geometric value of the first expression and the geometric value of the second expression spatially overlap.
Since:
3.1
  • Method Details

    • getOperatorType

      Returns the nature of the operator. A standard set of spatial operators is equal, disjoin, touches, within, overlaps, crosses, intersects, contains, beyond and BBOX.
      Specified by:
      getOperatorType in interface Filter<R>
      Specified by:
      getOperatorType in interface SpatialOperator<R>
      Returns:
      the nature of the operator.
    • getOperand1

      @UML(identifier="operand1", obligation=MANDATORY, specification=ISO_19143) default Expression<? super R,?> getOperand1()
      Returns the first expression to be evaluated. This is the element at index 0 in the expressions list. The returned expression should be an instance of ValueReference. The expression evaluation should return one of the following type:
      • A geometry instance.
      • A Feature instance if the operator shall be applied to the geometric values of all the spatial properties of the resource.
      This {code BinarySpatialOperator} evaluates to true if all tested spatial property values fulfill the spatial relationship implied by the operator.
      Returns:
      the first expression to be evaluated.
      Departure from OGC/ISO abstract specification:
      Generalization by relaxation of ISO/OGC restriction ISO 19143 restricts the type to ValueReference. GeoAPI relaxes this restriction by allowing arbitrary expressions.
    • getOperand2

      @UML(identifier="operand2", obligation=MANDATORY, specification=ISO_19143) default Expression<? super R,?> getOperand2()
      Returns the second expression to be evaluated. This is the element at index 1 in the expressions list. The returned expression should one of the following:
      Returns:
      the second expression to be evaluated.
      Departure from OGC/ISO abstract specification:
      Departure due to constraint of the Java language ISO 19143 restricts the type to SpatialDescription, which is a union between Geometry, Envelope and ValueReference. Union has no direct equivalence in Java and is replaced by documentation in this method.
    • getExpressions

      List<Expression<? super R,?>> getExpressions()
      Returns the two expressions to be evaluated by this operator. The list shall contain operand 1 and operand 2 in that order.
      Specified by:
      getExpressions in interface Filter<R>
      Returns:
      a list of size 2 containing the two expressions to be evaluated.