osmgraph 0.4.1

Convert OSM queries into graphs.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use osmgraph::api::OverpassResponse;

fn main() {

    //Vars to change
    let location = "./assets/test.json";

    //Get json structure from disk
    let loaded_json: OverpassResponse = OverpassResponse::load_blocking(location)
        .expect("Was unable to load json!");
    println!("Loaded json!");

    //Save the json to disk
    match loaded_json.save_blocking("./assets/test.json") {
        Ok(..) => println!("Saved json to {}!", location),
        Err(err) => println!("{}", err)
    }
}