pub struct CartesianConverter { /* private fields */ }Expand description
§CARTESIAN / GEODETIC CONVERSIONS
This material follows:
Bernhard Hofmann-Wellenhof & Helmut Moritz: Physical Geodesy, 2nd edition. Springer, 2005.
chapter 5.6: Coordinate transformations (HM, below),
and
Wikipedia: Geographic Coordinate Conversion, https://en.wikipedia.org/wiki/Geographic_coordinate_conversion
(WP, below).
The cartesian-to-geodetic conversion is based on Bowring’s celebrated method:
B. R. Bowring: Transformation from spatial to geographical coordinates Survey Review 23(181), pp. 323-327, 1976
(BB, below),
but could probably use some TLC from a newer and faster algorithm:
Toshio Fukushima: Transformation from Cartesian to Geodetic Coordinates Accelerated by Halley’s Method Journal of Geodesy, February 2006
(TF, below).
Close to the poles, we avoid singularities by switching to an approximation requiring knowledge of the geocentric radius at the given latitude. For this, we use an adaptation of the formula given in:
Wikipedia: Earth Radius https://en.wikipedia.org/wiki/Earth_radius#Radius_at_a_given_geodetic_latitude (Derivation and commentary at https://gis.stackexchange.com/q/20200)
(WP2, below)
These routines are probably not as robust at those in geocent.c, at least they haven’t been through as heavy use as their geocent sisters. Some care has been taken to avoid singularities, but extreme cases (e.g. setting es, the squared eccentricity, to 1), will cause havoc.
Trait Implementations§
Source§impl Clone for CartesianConverter
impl Clone for CartesianConverter
Source§fn clone(&self) -> CartesianConverter
fn clone(&self) -> CartesianConverter
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl CoordinateStep for CartesianConverter
impl CoordinateStep for CartesianConverter
Source§impl Debug for CartesianConverter
impl Debug for CartesianConverter
Source§impl From<CartesianConverter> for ProjectionTransform
impl From<CartesianConverter> for ProjectionTransform
Source§fn from(c: CartesianConverter) -> ProjectionTransform
fn from(c: CartesianConverter) -> ProjectionTransform
Source§impl PartialEq for CartesianConverter
impl PartialEq for CartesianConverter
Source§impl ProjectCoordinates for CartesianConverter
impl ProjectCoordinates for CartesianConverter
impl StructuralPartialEq for CartesianConverter
Auto Trait Implementations§
impl Freeze for CartesianConverter
impl !RefUnwindSafe for CartesianConverter
impl !Send for CartesianConverter
impl !Sync for CartesianConverter
impl Unpin for CartesianConverter
impl !UnwindSafe for CartesianConverter
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)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