H3 Cell Lookup
activeweather uses Uber's H3 hexagonal grid at resolution 6 for spatial indexing.
What is H3?
H3 is a hierarchical hexagonal grid system developed by Uber. It divides the Earth's surface into hexagonal cells at multiple resolutions. activeweather uses resolution 6, where each cell covers approximately 36 km².
H3 indexes are 15-character hex strings like 862a10747ffffff. The first character
encodes the resolution and base cell, and the remaining characters narrow down to the specific hexagon.
Converting lat/lon to H3
To get an H3 index from a latitude and longitude, use the H3 library for your language:
JavaScript
import { latLngToCell } from 'h3-js';
const h3Index = latLngToCell(47.6062, -122.3321, 6);
// "862a10747ffffff" Python
import h3
h3_index = h3.latlng_to_cell(47.6062, -122.3321, 6)
# "862a10747ffffff" curl (using the H3 CLI)
h3 latLngToCell --lat 47.6062 --lng -122.3321 --resolution 6 H3 libraries
| Language | Package |
|---|---|
| JavaScript/TypeScript | h3-js (npm) |
| Python | h3 (PyPI) |
| Java | com.uber.h3:h3 (Maven) |
| Go | github.com/uber/h3-go/v4 |
| Rust | h3o (crates.io) |
Online lookup tools
- H3 Geo Explorer — click a map to see cell indexes
- H3 Viewer — paste coordinates, get indexes
Resolution 6 only. The API accepts only resolution-6 indexes. Passing a different
resolution returns a 404. Use the conversion functions above with resolution parameter
set to 6.