geohash 0.2.6

Geohash implementation for Rust.
Documentation

Rust-Geohash

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

Build Status

Documentation

Usage

Cargo


[dependencies]

geohash = "*"

Rust

extern crate geohash;

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

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);
}

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.