elevation

Crates.ioelevation
lib.rselevation
version0.1.0
sourcesrc
created_at2021-07-18 22:19:42.590654
updated_at2021-07-18 22:19:42.590654
descriptionGet elevations from coordinates and names of locations
homepage
repositoryhttps://github.com/grantshandy/elevation
max_upload_size
id424489
size52,225
Grant Handy (grantshandy)

documentation

https://docs.rs/elevation

README

elevation

Get elevations from coordinates and names of locations.

Get an elevation from coordinates:

let e = Elevation::from_coords(45.0, 100.0).await.unwrap();

println!("({}, {}): {}", e.latitude, e.longitude, e.elevation);
(45, 100): 2057

Get elevations from multiple coordinates:

    let e = Elevation::from_multiple_coords(vec![[40.828, -73.9206], [41.1955, -82.424]])
        .await
        .unwrap();

    for x in e {
        println!("({}, {}): {}", x.latitude, x.longitude, x.elevation);
    }
(40.828, -73.9206): 12
(41.1955, -82.424): 277

Get an elevation from the name of a location:

let e = Elevation::from_location("Seattle, Washington")
    .await
    .unwrap();

println!("({}, {}): {}", e.latitude, e.longitude, e.elevation);
(47.6038321, -122.3300624): 77.5
Commit count: 3

cargo fmt