#gis #spatial-index #h3-gis #geospatial #geography #h3

no-std bin+lib h3o

A Rust implementation of the H3 geospatial indexing system

20 releases

0.8.0 Mar 31, 2025
0.7.1 Dec 24, 2024
0.7.0 Nov 15, 2024
0.6.4 May 10, 2024
0.3.1 Mar 17, 2023

#11 in Geospatial

Download history 4273/week @ 2024-12-29 7528/week @ 2025-01-05 6300/week @ 2025-01-12 6317/week @ 2025-01-19 4019/week @ 2025-01-26 5960/week @ 2025-02-02 6969/week @ 2025-02-09 3974/week @ 2025-02-16 4666/week @ 2025-02-23 6856/week @ 2025-03-02 7581/week @ 2025-03-09 8106/week @ 2025-03-16 6025/week @ 2025-03-23 6944/week @ 2025-03-30 8213/week @ 2025-04-06 6497/week @ 2025-04-13

28,012 downloads per month
Used in 8 crates

BSD-3-Clause

3MB
8K SLoC

h3o

Crates.io Docs.rs CI Status Coverage License

Rust implementation of the H3 geospatial indexing system.

Design

This is not a binding of the reference implementation, but a reimplementation from scratch.

The goals are:

  • To be safer/harder to misuse by leveraging the strong typing of Rust.
  • To be 100% Rust (no C deps): painless compilation to WASM, easier LTO, …
  • To be as fast (or even faster when possible) than the reference library.

Installation

Cargo

  • Install the rust toolchain in order to have cargo installed by following this guide.
  • run cargo install h3o

Usage

use h3o::{LatLng, Resolution};

let coord = LatLng::new(37.769377, -122.388903).expect("valid coord");
let cell = coord.to_cell(Resolution::Nine);

Why this name?

Rust is an iron oxide. A Rust version of H3 is an H3 oxide, in other word $H_3O$ (a.k.a hydronium). Chemically speaking this is wrong ( $H_3O$ is produced by protonation of $H_2O$, not oxidation of $H_3$), but ¯\(ツ)

License

BSD 3-Clause

Dependencies