public class GeoPointInBBoxQuery extends Query
NumericRangeQuery
and is implemented using a
two phase approach. First, candidate terms are queried using a numeric
range based on the morton codes of the min and max lat/lon pairs. Terms
passing this initial filter are passed to a final check that verifies whether
the decoded lat/lon falls within (or on the boundary) of the query bounding box.
The value comparisons are subject to a precision tolerance defined in
1.0E-6
NOTES:
1. All latitude/longitude values must be in decimal degrees.
2. Complex computational geometry (e.g., dateline wrapping) is not supported
3. For more advanced GeoSpatial indexing and query operations see spatial module
4. This is well suited for small rectangles, large bounding boxes may result
in many terms, depending whether the bounding box falls on the boundary of
many cells (degenerate case)Modifier and Type | Field and Description |
---|---|
protected String |
field |
protected double |
maxLat |
protected double |
maxLon |
protected double |
minLat |
protected double |
minLon |
Constructor and Description |
---|
GeoPointInBBoxQuery(String field,
double minLon,
double minLat,
double maxLon,
double maxLat) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
String |
getField() |
double |
getMaxLat() |
double |
getMaxLon() |
double |
getMinLat() |
double |
getMinLon() |
int |
hashCode() |
Query |
rewrite(IndexReader reader) |
String |
toString(String field) |
protected final String field
protected final double minLon
protected final double minLat
protected final double maxLon
protected final double maxLat
public GeoPointInBBoxQuery(String field, double minLon, double minLat, double maxLon, double maxLat)
public Query rewrite(IndexReader reader)
public final String getField()
public final double getMinLon()
public final double getMinLat()
public final double getMaxLon()
public final double getMaxLat()
Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.