Class LatLonShapeBoundingBoxQuery.EncodedLatLonRectangle

    • Field Detail

      • bbox

        protected final byte[] bbox
      • west

        private final byte[] west
    • Constructor Detail

      • EncodedLatLonRectangle

        EncodedLatLonRectangle​(double minLat,
                               double maxLat,
                               double minLon,
                               double maxLon)
    • Method Detail

      • validateMinLon

        private static double validateMinLon​(double minLon,
                                             double maxLon)
        returns a valid minLon (-180) if the bbox splits the dateline
      • encode

        private static void encode​(int minX,
                                   int maxX,
                                   int minY,
                                   int maxY,
                                   byte[] b)
        encodes a bounding box into the provided byte array
      • crossesDateline

        private boolean crossesDateline()
      • relateRangeBBox

        PointValues.Relation relateRangeBBox​(int minXOffset,
                                             int minYOffset,
                                             byte[] minTriangle,
                                             int maxXOffset,
                                             int maxYOffset,
                                             byte[] maxTriangle)
        compare this to a provided range bounding box
      • intersectRangeBBox

        PointValues.Relation intersectRangeBBox​(int minXOffset,
                                                int minYOffset,
                                                byte[] minTriangle,
                                                int maxXOffset,
                                                int maxYOffset,
                                                byte[] maxTriangle)
        intersects this to a provided range bounding box
      • compareBBoxToRangeBBox

        private PointValues.Relation compareBBoxToRangeBBox​(byte[] bbox,
                                                            int minXOffset,
                                                            int minYOffset,
                                                            byte[] minTriangle,
                                                            int maxXOffset,
                                                            int maxYOffset,
                                                            byte[] maxTriangle)
        static utility method to compare a bbox with a range of triangles (just the bbox of the triangle collection)
      • intersectBBoxWithRangeBBox

        private PointValues.Relation intersectBBoxWithRangeBBox​(byte[] bbox,
                                                                int minXOffset,
                                                                int minYOffset,
                                                                byte[] minTriangle,
                                                                int maxXOffset,
                                                                int maxYOffset,
                                                                byte[] maxTriangle)
        static utility method to compare a bbox with a range of triangles (just the bbox of the triangle collection) for intersection
      • disjoint

        private boolean disjoint​(byte[] bbox,
                                 int minXOffset,
                                 int minYOffset,
                                 byte[] minTriangle,
                                 int maxXOffset,
                                 int maxYOffset,
                                 byte[] maxTriangle)
        static utility method to check a bbox is disjoint with a range of triangles