public final class GeoPointInPolygonQuery extends GeoPointInBBoxQuery
GeoPointInBBoxQueryImpl and is implemented using a
three phase approach. First, like GeoPointInBBoxQueryImpl
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 secondary filter that verifies whether the decoded lat/lon point falls within
(or on the boundary) of the bounding box query. Finally, the remaining candidate
term is passed to the final point in polygon check.Polygonfield, maxLat, maxLon, minLat, minLon, termEncoding| Constructor and Description |
|---|
GeoPointInPolygonQuery(String field,
double[] polyLats,
double[] polyLons)
Deprecated.
|
GeoPointInPolygonQuery(String field,
GeoPointField.TermEncoding termEncoding,
double[] polyLats,
double[] polyLons)
Deprecated.
|
GeoPointInPolygonQuery(String field,
GeoPointField.TermEncoding termEncoding,
Polygon... polygons)
Constructs a new GeoPolygonQuery that will match encoded
GeoPointField terms
that fall within or on the boundary of the polygons defined by the input parameters. |
GeoPointInPolygonQuery(String field,
Polygon... polygons)
Constructs a new GeoPolygonQuery that will match encoded
GeoPointField terms
that fall within or on the boundary of the polygons defined by the input parameters. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
Polygon[] |
getPolygons()
API utility method for returning copy of the polygon array
|
int |
hashCode() |
Query |
rewrite(IndexReader reader)
throw exception if trying to change rewrite method
|
String |
toString(String field)
print out this polygon query
|
getField, getMaxLat, getMaxLon, getMinLat, getMinLonclassHash, createWeight, sameClassAs, toStringpublic GeoPointInPolygonQuery(String field, Polygon... polygons)
GeoPointField terms
that fall within or on the boundary of the polygons defined by the input parameters.@Deprecated public GeoPointInPolygonQuery(String field, double[] polyLats, double[] polyLons)
GeoPointInPolygonQuery(String, Polygon[]).GeoPointField terms
that fall within or on the boundary of the polygon defined by the input parameters.@Deprecated public GeoPointInPolygonQuery(String field, GeoPointField.TermEncoding termEncoding, double[] polyLats, double[] polyLons)
GeoPointInPolygonQuery(String, GeoPointField.TermEncoding, Polygon[]) instead.GeoPointField terms
that fall within or on the boundary of the polygon defined by the input parameters.public GeoPointInPolygonQuery(String field, GeoPointField.TermEncoding termEncoding, Polygon... polygons)
GeoPointField terms
that fall within or on the boundary of the polygons defined by the input parameters.public Query rewrite(IndexReader reader)
rewrite in class GeoPointInBBoxQuerypublic int hashCode()
hashCode in class GeoPointInBBoxQuerypublic boolean equals(Object obj)
equals in class GeoPointInBBoxQuerypublic String toString(String field)
toString in class GeoPointInBBoxQuerypublic Polygon[] getPolygons()
Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.