// the find
uber/h3-go
Go bindings for H3, a hierarchical hexagonal geospatial indexing system
Go bindings for Uber's H3 hexagonal geospatial indexing library, wrapping the C core via CGO. If you need to bucket lat/lng coordinates into a spatial grid — for ride pricing zones, heatmaps, proximity queries — this is the Go path to H3's full API. It's an official Uber project, not a community port.
The C source is vendored directly into the repo, so you don't need H3 installed on the host — `go get` is genuinely sufficient on any CGO-capable platform. The binding table is complete: all 60+ C API functions are mapped with idiomatic Go method receivers (e.g. `cell.GridDisk(k)` alongside `GridDisk(cell, k)`). Test coverage is real — there's a parity test suite under `x/h3go` that cross-checks the pure-Go experimental implementation against the C bindings. Actively maintained against H3 v4.5, with a clear migration guide for anyone still on v3.
CGO is a hard requirement, which kills cross-compilation in most Docker-based CI setups unless you configure a C toolchain — a real friction point for teams that rely on `GOOS=linux GOARCH=amd64` from macOS. The `x/h3go` pure-Go reimplementation in the repo is experimental and explicitly not the main API, so there's no escape hatch if CGO is off the table. Error handling leans on panics for invalid H3 index inputs in several places rather than returning errors, which is not idiomatic Go. Star count (438) is low for a utility this fundamental, suggesting the Go ecosystem mostly routes around it in favor of PostGIS or Python bindings.