elasticsearch/elasticsearch — pull request #2164 by chrismale (2012-08-13 01:09:05+00:00)
Title: GeoShape indexing and query support

Based on the spatial module in Lucene trunk, this PR adds support for indexing and querying arbitrary shapes (Points, Rectangles, Polygons). Since both documents and queries can be shapes, the notion of a relationship between shapes is included so users can query for shapes that intersect the query shape, are disjoint of, or are contained within. Also included is more extensive support for parsing GeoJSON shapes.

The underlying logic is implemented using two projects, Shape4j which provides Shape implemetations and handles much of the spatial logic, and JTS, which is used by Shape4j for Polygons and by code in the PR to implement the contains relationship.