pub struct Geographic<U: AngleUnit>(/* private fields */);Expand description
Geographic (lat / lon) coordinates on a spheroid in unit U.
Mirrors boost::geometry::cs::geographic<DegreeOrRadian>
(boost/geometry/core/cs.hpp:98-110).
§Convention: latitude measured from the equator
Same equatorial convention as Spherical<U> — the difference
is the earth model: Geographic distances run on a spheroid
(Andoyer / Vincenty / Thomas), Spherical on a perfect sphere
(Haversine). In coordinate order:
get::<0>(p) → longitude (east of Greenwich positive)
get::<1>(p) → latitude (north of the equator positive)In a Geographic<Degree> point, longitude ranges -180.0..=180.0
and latitude ranges -90.0..=90.0.
§Examples
use geometry_cs::{CoordinateSystem, Degree, Geographic, GeographicFamily};
fn _geo<C: CoordinateSystem<Family = GeographicFamily>>() {}
_geo::<Geographic<Degree>>();Trait Implementations§
Source§impl<U: Clone + AngleUnit> Clone for Geographic<U>
impl<U: Clone + AngleUnit> Clone for Geographic<U>
Source§fn clone(&self) -> Geographic<U>
fn clone(&self) -> Geographic<U>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<U: AngleUnit> CoordinateSystem for Geographic<U>
impl<U: AngleUnit> CoordinateSystem for Geographic<U>
Source§type Family = GeographicFamily
type Family = GeographicFamily
The CS family this concrete system belongs to. Read more
impl<U: Copy + AngleUnit> Copy for Geographic<U>
Source§impl<U: Default + AngleUnit> Default for Geographic<U>
impl<U: Default + AngleUnit> Default for Geographic<U>
Source§fn default() -> Geographic<U>
fn default() -> Geographic<U>
Returns the “default value” for a type. Read more
impl<U: Eq + AngleUnit> Eq for Geographic<U>
impl<U: PartialEq + AngleUnit> StructuralPartialEq for Geographic<U>
Auto Trait Implementations§
impl<U> Freeze for Geographic<U>
impl<U> RefUnwindSafe for Geographic<U>where
U: RefUnwindSafe,
impl<U> Send for Geographic<U>where
U: Send,
impl<U> Sync for Geographic<U>where
U: Sync,
impl<U> Unpin for Geographic<U>where
U: Unpin,
impl<U> UnsafeUnpin for Geographic<U>
impl<U> UnwindSafe for Geographic<U>where
U: UnwindSafe,
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