Class GeoEncodingUtils.DistancePredicate

  • Enclosing class:
    GeoEncodingUtils

    public static class GeoEncodingUtils.DistancePredicate
    extends GeoEncodingUtils.Grid
    A predicate that checks whether a given point is within a distance of another point.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private DistancePredicate​(int latShift, int lonShift, int latBase, int lonBase, int maxLatDelta, int maxLonDelta, byte[] relations, double lat, double lon, double distanceKey)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean test​(int lat, int lon)
      Check whether the given point is within a distance of another point.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • lat

        private final double lat
      • lon

        private final double lon
      • distanceKey

        private final double distanceKey
    • Constructor Detail

      • DistancePredicate

        private DistancePredicate​(int latShift,
                                  int lonShift,
                                  int latBase,
                                  int lonBase,
                                  int maxLatDelta,
                                  int maxLonDelta,
                                  byte[] relations,
                                  double lat,
                                  double lon,
                                  double distanceKey)
    • Method Detail

      • 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.