Class LatLonShapeBoundingBoxQuery.EncodedLatLonRectangle

java.lang.Object
org.apache.lucene.document.SpatialQuery.EncodedRectangle
org.apache.lucene.document.LatLonShapeBoundingBoxQuery.EncodedLatLonRectangle
Enclosing class:
LatLonShapeBoundingBoxQuery

private static class LatLonShapeBoundingBoxQuery.EncodedLatLonRectangle extends SpatialQuery.EncodedRectangle
Holds spatial logic for a bounding box that works in the encoded space
  • Field Details

    • bbox

      protected final byte[] bbox
    • west

      private final byte[] west
  • Constructor Details

    • EncodedLatLonRectangle

      EncodedLatLonRectangle(double minLat, double maxLat, double minLon, double maxLon)
  • Method Details

    • 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