Module org.apache.lucene.core
Package org.apache.lucene.document
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 Summary
Fields Modifier and Type Field Description protected byte[]
bbox
private byte[]
west
-
Fields inherited from class org.apache.lucene.document.SpatialQuery.EncodedRectangle
maxX, maxY, minX, minY, wrapsCoordinateSystem
-
-
Constructor Summary
Constructors Constructor Description EncodedLatLonRectangle(double minLat, double maxLat, double minLon, double maxLon)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description 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)private boolean
crossesDateline()
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 trianglesprivate static void
encode(int minX, int maxX, int minY, int maxY, byte[] b)
encodes a bounding box into the provided byte arrayprivate 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(package private) PointValues.Relation
intersectRangeBBox(int minXOffset, int minYOffset, byte[] minTriangle, int maxXOffset, int maxYOffset, byte[] maxTriangle)
intersects this to a provided range bounding box(package private) PointValues.Relation
relateRangeBBox(int minXOffset, int minYOffset, byte[] minTriangle, int maxXOffset, int maxYOffset, byte[] maxTriangle)
compare this to a provided range bounding boxprivate static double
validateMinLon(double minLon, double maxLon)
returns a valid minLon (-180) if the bbox splits the dateline-
Methods inherited from class org.apache.lucene.document.SpatialQuery.EncodedRectangle
contains, containsLine, containsRectangle, containsTriangle, intersectsLine, intersectsRectangle, intersectsTriangle, withinLine, withinTriangle, wrapsCoordinateSystem
-
-
-
-
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
-
-