coordinate-altitude

Crates.iocoordinate-altitude
lib.rscoordinate-altitude
version0.1.0
sourcesrc
created_at2024-07-05 21:20:19.06804
updated_at2024-07-05 21:20:19.06804
descriptionFetch altitude/elevation for geographical coordinates of planet Earth.
homepage
repositoryhttps://github.com/jeromeschmied/coordinate-altitude
max_upload_size
id1293392
size30,393
(JeromeSchmied)

documentation

https://docs.rs/coordinate-altitude

README

coordinate-altitude

fetch altitude/elevation data for a coordinate of planet Earth

example

after cargo add coordinate_altitude, do

use coordinate_altitude::*;

fn main() {
    // coordinate as a tuple
    let coord: (f64, f64) = (34.324, 1.88832);
    // coordinate as a `Coord`
    let coord: Coord = coord.into();
    // and finally fetch altitude for `coord`
    let coord: Option<Coord> = coord.fetch_altitude();
    println!("coordinate: {coord:?}");
}

see examples for more

warning!

open-elevation is only 6 decimal places accurate eg.: 32.324325435 will become 32.324325

dependencies

Commit count: 19

cargo fmt