geosot 0.1.0

Implementing the GeoSot in Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use geosot::{get_code, to_string};


fn main() {
    let x = 76.233;
    let y = 27.688;
    let level = 32;
    let code = get_code(x, y, level);
    
    // 32级
    // code: 339638376531246140
    // grid: G001023122-203103-131010.33003300330
    println!("经维度: {} {}", x, y);
    println!("code: {}", code);
    println!("grid: {}", to_string(code, level));
}