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.Polygon
field, 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, getMinLon
classHash, createWeight, sameClassAs, toString
public 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 GeoPointInBBoxQuery
public int hashCode()
hashCode
in class GeoPointInBBoxQuery
public boolean equals(Object obj)
equals
in class GeoPointInBBoxQuery
public String toString(String field)
toString
in class GeoPointInBBoxQuery
public Polygon[] getPolygons()
Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.