# golang/geo

S2 geometry library in Go

Repository: https://github.com/golang/geo
Canonical: https://ross.abutalabs.com/products/golang-geo
Language: Go
License: Apache-2.0
License Family: permissive
Topics: go, geometry, geometry-library, sphere
Last push: 2026-08-24T18:16:29+00:00

## Health v2 (maintenance only)
Score: 77/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 35, longevity 100
- inputs: {"age_days": 4291, "days_push": 9, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1849, forks 197 (observed 2026-08-28T04:05:44.113920+00:00)

## What it is
A Go library implementing the S2 spherical geometry system for representing and manipulating geometric shapes on a sphere. It provides regions, hierarchical cell decomposition, spatial indexing, and robust predicates for geographic data.

## Use cases
- index geographic locations for fast nearby queries
- check whether a lat/lng point falls inside a polygon
- compute distances and areas on the earth's surface
- build a distributed spatial index using S2 cells
- union and intersect arbitrary polygons on a sphere
- simplify and snap geospatial geometry with topology guarantees

## When to choose
- you need robust spherical geometry operations in Go
- you're building location-based search or geofencing features
- you need scalable spatial indexing for large geographic datasets

## When to avoid
- you need planar 2D geometry rather than spherical
- you need rendering or projection to map tiles
- you work in a language other than Go (use the C++/Java S2 ports)

## Facets
- artifact type: library
- maturity: stable
- function: geospatial, math, search-engine
- domain: -
- platform: go, cross-platform
- tags: s2-geometry, spherical-geometry, spatial-indexing, spatial-index, geospatial, algorithms, maps

## Member repositories
- golang/geo (main) score 77

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:44.113920+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:17:46.104463+00:00, confidence not recorded.
  - readme: https://github.com/golang/geo (fetched 2026-08-28T04:05:44.113920+00:00, sha 96905767a64e)
- Data as of 2026-08-30T08:39:29.467469+00:00.
