[][src]Struct ofdb_entities::geo::MapPoint

pub struct MapPoint { /* fields omitted */ }

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]

pub fn try_from_lat_lng_deg<LAT: Into<f64>, LNG: Into<f64>>(
    lat: LAT,
    lng: LNG
) -> Result<Self, CoordRangeError>
[src]

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.

impl PartialEq<MapPoint> for MapPoint[src]

impl StructuralEq for MapPoint[src]

impl StructuralPartialEq for MapPoint[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,