#gis #geography #geohash

geohash

Geohash implementation for Rust

18 unstable releases (6 breaking)

0.7.1 Aug 11, 2018
0.7.0 May 27, 2018
0.6.0 Apr 28, 2018
0.5.0 Jan 14, 2018
0.1.1 Nov 21, 2014

#5 in Science

Download history 114/week @ 2018-06-28 126/week @ 2018-07-05 218/week @ 2018-07-12 244/week @ 2018-07-19 126/week @ 2018-07-26 225/week @ 2018-08-02 277/week @ 2018-08-09 244/week @ 2018-08-16 104/week @ 2018-08-23 147/week @ 2018-08-30 91/week @ 2018-09-06 257/week @ 2018-09-13 219/week @ 2018-09-20

745 downloads per month
Used in 4 crates (2 directly)

MIT/Apache

12KB
215 lines

Rust-Geohash

Rust-Geohash is a Rust library for Geohash algorithm. Ported from node-geohash module.

Build Status

Documentation

Usage

extern crate geohash;

use geo::{Coordinate};
use geohash::{encode, decode, neighbor, Direction};

fn main() {
    let c = Coordinate{x: 112.5584f64, y: 37.8324f64};
    println!("encoding 37.8324, 112.5584: {}", encode(c, 9u));
    let (c, _, _) = decode("ww8p1r4t8");
    println!("decoding ww8p1r4t8 to: {}, {}", c.y, c.x);
    let sw = neighbor("ww8p1r4t8", Direction::SW);
}

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~181KB