Crates.io | geomorph |
lib.rs | geomorph |
version | 2.0.2 |
source | src |
created_at | 2018-06-05 23:19:45.198179 |
updated_at | 2024-09-13 19:59:09.661539 |
description | Simple conversion between different coordinate systems |
homepage | |
repository | https://github.com/vlopes11/geomorph |
max_upload_size | |
id | 68789 |
size | 36,745 |
Simple conversion between different coordinate systems without external wrappers injection
use geomorph::{Coord, Mgrs, MgrsPrecision, Utm};
let lat: f64 = -23.0095839;
let lon: f64 = -43.4361816;
let coord = Coord::new(lat, lon);
let utm = Utm::from(coord);
let mgrs = Mgrs::from_latlon(lat, lon);
println!("coord: {}", coord);
println!("utm: {}", utm);
println!(
"mgrs precision 10km: {}",
mgrs.with_precision(MgrsPrecision::P10km)
)