| Crates.io | coordinate-altitude |
| lib.rs | coordinate-altitude |
| version | 0.1.0 |
| created_at | 2024-07-05 21:20:19.06804+00 |
| updated_at | 2024-07-05 21:20:19.06804+00 |
| description | Fetch altitude/elevation for geographical coordinates of planet Earth. |
| homepage | |
| repository | https://github.com/jeromeschmied/coordinate-altitude |
| max_upload_size | |
| id | 1293392 |
| size | 30,393 |
fetch altitude/elevation data for a coordinate of planet Earth
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
open-elevation is only 6 decimal places accurate
eg.: 32.324325435 will become 32.324325