Skip to main content

Datum

Struct Datum 

Source
pub struct Datum { /* private fields */ }
Expand description

Horizontal geodetic datum: ellipsoid and its transformation to WGS 84.

Each provided datum uses the EPSG transformation for its home area, with the accuracy EPSG states: a few metres for a modern seven-parameter fit, tens of metres for a continental mean translation. This is the accuracy of the shift, not of the chart; a chart’s own datum note, when present, takes precedence over this table.

Implementations§

Source§

impl Datum

Source

pub const WGS84: Self

WGS 84: the GNSS datum, and the datum of every Position.

Source

pub const NAD83: Self

NAD83, on GRS 80. Equivalent to WGS 84 at chart accuracy: EPSG 1188 (identity), 4 m.

Source

pub const ED50: Self

ED50, on International 1924: western European charts before ETRS 89. EPSG 1133 (Europe mean), 10 m.

Source

pub const NAD27: Self

NAD27, on Clarke 1866: older US charts. EPSG 1173 (CONUS mean), 10 m.

Source

pub const OSGB36: Self

OSGB36, on Airy 1830. EPSG 1314 (seven-parameter, Great Britain), 2 m.

Source

pub const PULKOVO_1942: Self

Pulkovo 1942, on Krassowsky 1940: Russian and former-USSR charts. EPSG 5044 (GOST R 51794-2001, Russia), 3 m. Published in the coordinate frame convention; stored here in the position vector convention.

Source

pub const TOKYO: Self

Tokyo, on Bessel 1841: Japanese and Korean charts before JGD 2000. EPSG 1230 (Japan and South Korea mean), 29 m; the shift itself exceeds 400 m.

Source

pub const DHDN: Self

DHDN (Potsdam), on Bessel 1841: German charts before ETRS 89. EPSG 1777 (Germany), 3 m.

Source

pub const AGD66: Self

AGD66, on the Australian National Spheroid. EPSG 15788 (Australia mean), 5 m.

Source

pub const SAD69: Self

SAD69, on GRS 1967 Modified. EPSG 1864 (continental mean), 19 m.

Source

pub fn new( name: &'static str, ellipsoid: Ellipsoid, to_wgs84: Helmert, accuracy: Distance, ) -> Self

Datum from its ellipsoid, transformation to WGS 84 and stated accuracy: for datums not in the table, or with parameters from a chart note.

Source

pub const fn name(&self) -> &'static str

Datum name, as in a chart note.

Source

pub const fn ellipsoid(&self) -> &Ellipsoid

Reference ellipsoid.

Source

pub const fn to_wgs84_helmert(&self) -> &Helmert

Transformation from this datum’s geocentric frame to WGS 84.

Source

pub fn accuracy(&self) -> Distance

Stated accuracy of the shift; zero for WGS 84.

Source

pub fn to_wgs84(&self, position: Position) -> Result<Position>

Chart position on this datum → WGS 84.

Placed on the datum ellipsoid at zero height, transformed via ECEF, read back on WGS 84. A ship is within ~100 m of the ellipsoid and the shift tilts the normal by ≤ 0.1 mrad, so dropping height costs about 1 cm.

§Errors

KernelError::Indeterminate if the transformed point has no geodetic position; impossible with published parameters, possible with arbitrary Helmert values.

Source

pub fn from_wgs84(&self, position: Position) -> Result<Position>

WGS 84 position (GNSS fix) → position on this datum, for plotting on its chart.

Exact inverse of Datum::to_wgs84 apart from the height dropped at each end: round trip closes to ~1 cm in the datum’s home area, a decimetre or two on the far side of the Earth where its ellipsoid is kilometres from WGS 84.

§Errors

As Datum::to_wgs84.

Trait Implementations§

Source§

impl Clone for Datum

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for Datum

Source§

impl Debug for Datum

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for Datum

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for Datum

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Datum

Auto Trait Implementations§

§

impl Freeze for Datum

§

impl RefUnwindSafe for Datum

§

impl Send for Datum

§

impl Sync for Datum

§

impl Unpin for Datum

§

impl UnsafeUnpin for Datum

§

impl UnwindSafe for Datum

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.