This library is built on Google's S2 geometry library, providing some optimizations (S2CellIds
) and utilities (everything else).
There are several excellent blog posts describing what Google's library provides:
- Google’s S2, geometry on the sphere, cells and Hilbert curve by Christian S. Perone
- S2 cells and space-filling curves: Keys to building better digital map tools for cities by Sven Kreiss
This version of S2CellId
has been optimized for use Android to reduce the number of allocations required. It can be used to replace S2CellId
objects with long
.
Has some utility methods for working with distances in the S2 library. Most notably, it contains a port of the Android Location distance method that computes the distance on the WGS84 spheroid. This allows distance calculations to more closely match between representations.
This library uses bazel for compilation.
bazel build :s2