- 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 Summary
Modifier and TypeMethodDescriptionQuantity<Length>
Returns the buffer distance around the geometry that will be used when comparing features' geometries.List<Expression<? super R,
?>> Returns the two expressions to be evaluated by this operator.The literal geometry from which distances are measured.Returns the nature of the operator.
-
Method Details
-
getOperatorType
@UML(identifier="operatorType", obligation=MANDATORY, specification=ISO_19143) DistanceOperatorName getOperatorType()Returns the nature of the operator. A standard set of spatial operators is within and beyond.- Specified by:
getOperatorType
in interfaceFilter<R>
- Specified by:
getOperatorType
in interfaceSpatialOperator<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 beGeometry
instances. The list content is as below:- The first expression should be a
ValueReference
evaluating to aGeometry
. But it may also evaluate to aFeature
if the operator shall be applied to the geometric values of all the spatial properties of the resource. In this case, the operator evaluates totrue
if all tested spatial property values fulfill the spatial relationship implied by the operator. -
The second expression should be a literal evaluating
to the same geometry than the one returned by
getGeometry()
. -
The third expression should be a literal evaluating
to the same measure than the one returned by
getDistance()
.
- Specified by:
getExpressions
in interfaceFilter<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
anddistance
). GeoAPI puts the expression and the 2 parameters in a single list for enabling access to all parameters in a more generic wayFilter#getExpressions().
- The first expression should be a
-
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.
-