The S2 Geometry Library is a spherical geometry library, useful for manipulating regions on the sphere (commonly on Earth) and indexing geographic data. See http://godoc.org/github.com/golang/geo/s2 for documentation. For an analogous library in C++, see http://code.google.com/p/s2-geometry-library/.