#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

#10 in Geospatial

Download history 2726/week @ 2024-12-23 4298/week @ 2024-12-30 7446/week @ 2025-01-06 6344/week @ 2025-01-13 6560/week @ 2025-01-20 3725/week @ 2025-01-27 6000/week @ 2025-02-03 6930/week @ 2025-02-10 4096/week @ 2025-02-17 4663/week @ 2025-02-24 6894/week @ 2025-03-03 7581/week @ 2025-03-10 8149/week @ 2025-03-17 5896/week @ 2025-03-24 6976/week @ 2025-03-31 8105/week @ 2025-04-07

29,471 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