Python implementation of a part of the C++ S2 geometry library. Install with:
pip install s2sphere
The S2 geometry library is explained in more detail in this presentation by Octavian Procopiuc. It maps a sphere to a 1D index. This enables scalable proximity searches using distributed indices such as with MongoDB and App Engine Datastore. The test cases of this package are extensive and reflect those in the original S2 geometry library.