Expand description
H3 hexagonal hierarchical spatial index.
Uber’s H3 system maps the globe into hexagonal cells at 16 resolutions (0 = ~4.3M km² to 15 = ~0.9 m²). Advantages over geohash:
- Uniform cell area (no pole distortion)
- Hexagonal tessellation (6 equidistant neighbors vs 8 unequal for geohash)
- Better for analytics: equal-area binning for heatmaps
Uses the h3o crate (pure Rust H3 implementation).
Functions§
- h3_
encode - Encode a (longitude, latitude) coordinate to an H3 cell index.
- h3_
encode_ string - Encode to H3 hex string (standard representation).
- h3_
is_ valid - Check if an H3 index is valid.
- h3_
neighbors - Get all neighbor cells (k-ring of distance 1).
- h3_
parent - Get the parent cell at a coarser resolution.
- h3_
resolution - Get the resolution of an H3 cell index.
- h3_
to_ boundary - Decode an H3 cell index to its boundary polygon.
- h3_
to_ center - Decode an H3 cell index to its center point (lng, lat).