Struct ofdb_entities::geo::MapPoint [−][src]
Compact internal representation of a geographical location on a (flat) map.
Implementations
impl MapPoint[src]
pub const fn new(lat: LatCoord, lng: LngCoord) -> Self[src]
pub const fn lat(self) -> LatCoord[src]
pub const fn lng(self) -> LngCoord[src]
pub fn is_valid(self) -> bool[src]
pub fn to_lat_lng_rad(self) -> (f64, f64)[src]
pub fn to_lat_lng_deg(self) -> (f64, f64)[src]
pub fn from_lat_lng_deg<LAT: Into<f64>, LNG: Into<f64>>(
lat: LAT,
lng: LNG
) -> Self[src]
lat: LAT,
lng: LNG
) -> Self
pub fn try_from_lat_lng_deg<LAT: Into<f64>, LNG: Into<f64>>(
lat: LAT,
lng: LNG
) -> Result<Self, CoordRangeError>[src]
lat: LAT,
lng: LNG
) -> Result<Self, CoordRangeError>
impl MapPoint[src]
pub fn distance(p1: MapPoint, p2: MapPoint) -> Option<Distance>[src]
Calculate the great-circle distance on the surface of the earth using a special case of the Vincenty formula for numerical accuracy. Reference: https://en.wikipedia.org/wiki/Great-circle_distance
Trait Implementations
impl Clone for MapPoint[src]
impl Copy for MapPoint[src]
impl Debug for MapPoint[src]
impl Default for MapPoint[src]
impl Display for MapPoint[src]
impl Eq for MapPoint[src]
impl FromStr for MapPoint[src]
type Err = MapPointInputError
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<Self, Self::Err>[src]
impl PartialEq<MapPoint> for MapPoint[src]
impl StructuralEq for MapPoint[src]
impl StructuralPartialEq for MapPoint[src]
Auto Trait Implementations
impl RefUnwindSafe for MapPoint
impl Send for MapPoint
impl Sync for MapPoint
impl Unpin for MapPoint
impl UnwindSafe for MapPoint
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
impl<T> ToString for T where
T: Display + ?Sized, [src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,