- 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 Summary
Modifier and TypeMethodDescriptionList<Expression<? super R,
?>> Returns the two expressions to be evaluated by this operator.default Expression<? super R,
?> Returns the first expression to be evaluated.default Expression<? super R,
?> Returns the second expression to be evaluated.Returns the nature of the operator.
-
Method Details
-
getOperatorType
@UML(identifier="operatorType", obligation=MANDATORY, specification=ISO_19143) SpatialOperatorName 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 interfaceFilter<R>
- Specified by:
getOperatorType
in interfaceSpatialOperator<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 ofValueReference
. 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.
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 toValueReference
. 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:- A
ValueReference
. - A
Literal
evaluating to a geometry object. - A
Literal
evaluating to anEnvelope
.
- 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 toSpatialDescription
, which is a union betweenGeometry
,Envelope
andValueReference
. Union has no direct equivalence in Java and is replaced by documentation in this method.
- A
-
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 interfaceFilter<R>
- Returns:
- a list of size 2 containing the two expressions to be evaluated.
-