pub struct PlaneProjection { /* private fields */ }Expand description
A plane projection, useful for blazingly fast approximate distance calculations. Based on WGS84 ellipsoid model of the Earth, plane projection provides 0.1% precision on distances under 500km at latitudes up to the 65°. See https://blog.mapbox.com/fast-geodesic-approximations-with-cheap-ruler-106f229ad016 for more details about the principle and formulas behind.
use plane_projection::PlaneProjection;
let proj = PlaneProjection::new(55.65);
let distance = proj.distance((55.704141722528554, 13.191304107330561), (55.60330902847681, 13.001973666557435));
assert_eq!(distance as u32, 16373);Implementations§
Auto Trait Implementations§
impl Freeze for PlaneProjection
impl RefUnwindSafe for PlaneProjection
impl Send for PlaneProjection
impl Sync for PlaneProjection
impl Unpin for PlaneProjection
impl UnwindSafe for PlaneProjection
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more