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

LanguagePackage
JavaScript/TypeScripth3-js (npm)
Pythonh3 (PyPI)
Javacom.uber.h3:h3 (Maven)
Gogithub.com/uber/h3-go/v4
Rusth3o (crates.io)

Online lookup tools

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.

Next: Response Format →