Package org.apache.lucene.geo
Class GeoEncodingUtils.DistancePredicate
java.lang.Object
org.apache.lucene.geo.GeoEncodingUtils.Grid
org.apache.lucene.geo.GeoEncodingUtils.DistancePredicate
- Enclosing class:
- GeoEncodingUtils
A predicate that checks whether a given point is within a distance of another point.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final double
private final double
private final double
Fields inherited from class org.apache.lucene.geo.GeoEncodingUtils.Grid
ARITY, latBase, latShift, lonBase, lonShift, maxLatDelta, maxLonDelta, relations
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
DistancePredicate
(int latShift, int lonShift, int latBase, int lonBase, int maxLatDelta, int maxLonDelta, byte[] relations, double lat, double lon, double distanceKey) -
Method Summary
Modifier and TypeMethodDescriptionboolean
test
(int lat, int lon) Check whether the given point is within a distance of another point.
-
Field Details
-
lat
private final double lat -
lon
private final double lon -
distanceKey
private final double distanceKey
-
-
Constructor Details
-
DistancePredicate
private DistancePredicate(int latShift, int lonShift, int latBase, int lonBase, int maxLatDelta, int maxLonDelta, byte[] relations, double lat, double lon, double distanceKey)
-
-
Method Details
-
test
public boolean test(int lat, int lon) Check whether the given point is within a distance of another point. NOTE: this operates directly on the encoded representation of points.
-