google/s2geometry
Computational geometry and spatial indexing on the sphere observed · 2026-08-28
Health v2 · maintenance only
84/100
- Activity 99
- Release rhythm 56
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.
- gap_med: 141
- age_days: 3943
- days_rel: 132
- days_push: 9
- n_releases_24m: 4
Adoption not part of the score
2717 stars · 355 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
S2 Geometry is a C++ library (with Python bindings) for computational geometry and spatial indexing on the sphere, representing geographic data on a 3D globe rather than flat map projections. It provides robust spatial indexes, constructive operations like intersection and union, and fast proximity queries over points, polylines, and polygons.
Use cases
- index billions of geographic points for fast nearby queries
- find all points within 100km of a target location
- compute intersections and unions of polygons on the Earth's surface
- build a worldwide geographic database with no seams or singularities
- approximate arbitrary regions as collections of discrete S2 cells for distributed spatial indexes
- test whether a point is contained within a polygon
- measure distances and compute centroids of geographic shapes
When to choose
- you need robust spherical geometry instead of flat 2D map projections
- you are building large-scale geographic or spatial databases
- you need fast in-memory spatial indexing of points, polylines, and polygons
- you need globally consistent spatial indexing without projection distortion or dateline seams
- you want a battle-tested library used extensively on Google's geographic data
When to avoid
- you only need simple planar 2D geometry unrelated to the Earth's surface
- you need ellipsoidal (geodesic) precision, which is orders of magnitude slower
- you require a stable API or ABI - releases are 0.x with no stability guarantees
- you need first-class Windows support or a mature Pythonic API (the SWIG Python interface is unstable)
Facets
library · maturity active
search-engine math geospatial databases developer-tools cpp python cross-platform spherical-geometry spatial-indexing s2-cells geospatial computational-geometry geographic-data maps algorithms linux macos
6 sources
- readme: https://github.com/google/s2geometry · fetched 2026-08-28 · 4b88f9fcc0f3
- homepage: http://s2geometry.io/ · fetched 2026-08-29 · 7d8e976fc2e7
- site_page: https://s2geometry.io/about · fetched 2026-08-29 · 40d058e3da3d
- site_page: https://s2geometry.io/about/overview · fetched 2026-08-29 · f6c4d6a6010a
- site_page: https://s2geometry.io/devguide/cpp/quickstart · fetched 2026-08-29 · 8b19bccd8935
- site_page: https://s2geometry.io/about/platforms · fetched 2026-08-29 · 8cc57f337ed9
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| google/s2geometry | main | 84 |
For agents
markdown · JSON · MCP: product_card(name="google/s2geometry")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem