Class GeoEncodingUtils.PolygonPredicate

  • Enclosing class:
    GeoEncodingUtils

    public static class GeoEncodingUtils.PolygonPredicate
    extends GeoEncodingUtils.Grid
    A predicate that checks whether a given point is within a polygon.
    • Constructor Detail

      • PolygonPredicate

        private PolygonPredicate​(int latShift,
                                 int lonShift,
                                 int latBase,
                                 int lonBase,
                                 int maxLatDelta,
                                 int maxLonDelta,
                                 byte[] relations,
                                 Component2D tree)
    • Method Detail

      • test

        public boolean test​(int lat,
                            int lon)
        Check whether the given point is within the considered polygon. NOTE: this operates directly on the encoded representation of points.