[−][src]Struct geom::LonLat
Represents a (longitude, latitude) point.
Fields
longitude: NotNan<f64>
latitude: NotNan<f64>
Implementations
impl LonLat
[src]
pub fn new(lon: f64, lat: f64) -> LonLat
[src]
Note the order of arguments!
pub fn x(self) -> f64
[src]
Returns the longitude of this point.
pub fn y(self) -> f64
[src]
Returns the latitude of this point.
pub(crate) fn gps_dist(self, other: LonLat) -> Distance
[src]
Returns the Haversine distance to another point.
pub fn fast_dist(self, other: LonLat) -> NotNan<f64>
[src]
Pretty meaningless units, for comparing distances very roughly
pub fn read_osmosis_polygon(path: String) -> Result<Vec<LonLat>, Box<dyn Error>>
[src]
Parses a file in the https://wiki.openstreetmap.org/wiki/Osmosis/Polygon_Filter_File_Format and returns all points.
Trait Implementations
impl Clone for LonLat
[src]
impl Copy for LonLat
[src]
impl Debug for LonLat
[src]
impl<'de> Deserialize<'de> for LonLat
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Display for LonLat
[src]
impl Eq for LonLat
[src]
impl Ord for LonLat
[src]
fn cmp(&self, other: &LonLat) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<LonLat> for LonLat
[src]
impl PartialOrd<LonLat> for LonLat
[src]
fn partial_cmp(&self, other: &LonLat) -> Option<Ordering>
[src]
fn lt(&self, other: &LonLat) -> bool
[src]
fn le(&self, other: &LonLat) -> bool
[src]
fn gt(&self, other: &LonLat) -> bool
[src]
fn ge(&self, other: &LonLat) -> bool
[src]
impl Serialize for LonLat
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl StructuralEq for LonLat
[src]
impl StructuralPartialEq for LonLat
[src]
Auto Trait Implementations
impl RefUnwindSafe for LonLat
impl Send for LonLat
impl Sync for LonLat
impl Unpin for LonLat
impl UnwindSafe for LonLat
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,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
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.
fn to_owned(&self) -> T
[src]
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.
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>,