A Rust implementation of Google’s S2 geometry library: spherical geometry on the surface of a sphere, built around a hierarchical decomposition of the sphere into cells. It’s what you reach for when flat-plane geometry isn’t good enough — proximity search, region containment, and indexing for points, lines, and polygons on the globe.
This is an ongoing port, further along in some areas than others — in particular, lines and polygons aren’t implemented yet. Rather than maintain a status table here that quietly goes stale, have a look at the issue tracker for what’s implemented, what’s missing, and what’s being worked on.
Contributions of any size are very welcome — typo fixes, bug reports,
new tests, or porting a whole piece of functionality. See
CONTRIBUTING.md to get started; issues labeled
good first issue
are a good place to look if you’re new here.
Please also take a look at our Code of Conduct, and our Security Policy if you need to report a vulnerability.
This library exists thanks to @yjh0502, who started and has driven most of this port, with substantial contributions from @brawer, @nside, @Louisvranderick, and @HLennart — and everyone else in the contributors graph. Thank you all! 🎉
Apache-2.0 — see LICENSE.