org.apache.lucene.spatial.geopoint.search

Class GeoPointInPolygonQuery



  • public final class GeoPointInPolygonQuery
    extends GeoPointInBBoxQuery
    Implements a simple point in polygon query on a GeoPoint field. This is based on 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.
    See Also:
    Polygon