pub struct Datum { /* private fields */ }Expand description
A geodetic datum, defined by a reference ellipsoid and its relationship to WGS84.
Implementations§
Source§impl Datum
impl Datum
Sourcepub fn new(ellipsoid: Ellipsoid, to_wgs84: DatumToWgs84) -> Result<Self>
pub fn new(ellipsoid: Ellipsoid, to_wgs84: DatumToWgs84) -> Result<Self>
Create a datum from an ellipsoid and an explicit path to WGS84.
Sourcepub fn with_epsg(self, epsg: u32) -> Self
pub fn with_epsg(self, epsg: u32) -> Self
Attach the EPSG geodetic datum code this definition corresponds to.
Sourcepub const fn to_wgs84(&self) -> &DatumToWgs84
pub const fn to_wgs84(&self) -> &DatumToWgs84
Return the explicit relationship from this datum to WGS84.
Sourcepub fn is_wgs84_compatible(&self) -> bool
pub fn is_wgs84_compatible(&self) -> bool
Returns true if this datum is WGS84 or functionally identical (no Helmert shift needed).
Sourcepub fn has_known_wgs84_transform(&self) -> bool
pub fn has_known_wgs84_transform(&self) -> bool
Returns true if this datum has a known path to WGS84.
Sourcepub fn uses_grid_shift(&self) -> bool
pub fn uses_grid_shift(&self) -> bool
Returns true if this datum’s WGS84 path uses one or more horizontal grids.
Sourcepub fn helmert_to_wgs84(&self) -> Option<&HelmertParams>
pub fn helmert_to_wgs84(&self) -> Option<&HelmertParams>
Return the Helmert parameters for this datum’s path to WGS84, when available.
Sourcepub fn same_datum(&self, other: &Datum) -> bool
pub fn same_datum(&self, other: &Datum) -> bool
Returns true if two datums are the same.
WGS84-compatible (Identity) datums form an equivalence class
regardless of code. Otherwise, when both sides carry an EPSG datum
code, code equality decides. Code-less (custom) datums fall back to
structural comparison, where two Unknown datums are never equal —
fail-closed for operation selection.
Trait Implementations§
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> 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more