I'm pleased to announce the initial open source release of the Go port
of the S2 geometry library:
https://code.google.com/p/gos2/
http://godoc.org/code.google.com/p/gos2/s2
(or "go get
code.google.com/p/gos2/s2".)
/*
Package s2 implements types and functions for working with geometry in
S² (spherical geometry).
Its related packages, parallel to this one, are s1 (operates on S¹),
r1 (operates on ℝ¹) and r3 (operates on ℝ³).
This package provides types and functions for the S2 cell hierarchy
and coordinate systems. The S2 cell hierarchy is a hierarchical
decomposition of the surface of a unit sphere (S²) into “cells”; it is
highly efficient, scales from continental size to under 1 cm² and
preserves spatial locality (nearby cells have close IDs).
A presentation that gives an overview of S2 is
https://docs.google.com/presentation/d/1Hl4KapfAENAOf4gv-pSngKwvS_jwNVHRPZTTDzXXn6Q/view.
*/
Note that it is not as complete as the C++ version it is based on, but
it works well for what it does support, and is sufficient for geo
indexing and the like.