h3o

Crates.ioh3o
lib.rsh3o
version0.7.0
sourcesrc
created_at2023-01-09 02:49:29.038729
updated_at2024-11-15 05:37:39.82693
descriptionA Rust implementation of the H3 geospatial indexing system.
homepagehttps://docs.rs/h3o
repositoryhttps://github.com/HydroniumLabs/h3o
max_upload_size
id754064
size11,854,527
Sylvain Laperche (grim7reaper)

documentation

https://docs.rs/h3o/

README

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

Commit count: 144

cargo fmt