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
FieldsFields inherited from class org.apache.lucene.document.SpatialQuery.EncodedRectangle
maxX, maxY, minX, minY, wrapsCoordinateSystem
-
Constructor Summary
ConstructorsConstructorDescriptionEncodedLatLonRectangle
(double minLat, double maxLat, double minLon, double maxLon) -
Method Summary
Modifier and TypeMethodDescriptionprivate 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
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 datelineMethods inherited from class org.apache.lucene.document.SpatialQuery.EncodedRectangle
contains, containsLine, containsRectangle, containsTriangle, intersectsLine, intersectsRectangle, intersectsTriangle, withinLine, withinTriangle, wrapsCoordinateSystem
-
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
-