Lucene provides a rich set of application programming interfaces (APIs) to index and query spatial fields, which allows for a variety of queries to be performed. Lucene allows either flat-plane or spherical models of spatial search.
Some key features of Lucene in that space are multidimensional points, latitude and longitudinal points, and box queries.
Lucene has a spatial module, which is the core engine responsible for spatial indexing and searching. The next section examines the API exposed by the module.
Spatial Module
The spatial module is based on Spatial4j, an Apache-licensed library ...