Skip to main content

EcefSpace

Struct EcefSpace 

Source
pub struct EcefSpace<R>
where R: RealField,
{ /* private fields */ }
Expand description

A position in the WGS 84 Earth-centred, Earth-fixed (ECEF) Cartesian coordinate system, in metres.

The WGS 84 coordinate system is geocentric, with its origin at the centre of mass of the whole Earth including oceans and atmosphere, and is a right-handed, Earth-fixed orthogonal system (NGA 2014, §2.1). Its Z axis runs along the Earth’s rotation axis, positive north; X passes through the intersection of the prime meridian and the equator, and Y through the equator at longitude 90° E (IOGP 2012, §2.2.1). Distance is the Euclidean norm of the coordinate difference, the straight-line distance in metres.

§Coordinate index mapping

  • 0 => x
  • 1 => y
  • 2 => z

§References

  • National Geospatial-Intelligence Agency (2014). World Geodetic System 1984: Its Definition and Relationships with Local Geodetic Systems, NGA.STND.0036_1.0.0_WGS84, version 1.0.0. §2.1. Copy: papers/NGA.STND.0036_1.0.0_WGS84.pdf.
  • IOGP (2012). Geomatics Guidance Note 7, part 2: Coordinate Conversions and Transformations including Formulas, OGP Publication 373-7-2. §2.2.1, p. 89. Copy: papers/iogp_2012_373-7-2_coordinate_conversions_and_transformations.pdf.

Implementations§

Source§

impl<R: RealField> EcefSpace<R>

Source

pub fn x(&self) -> R

Source

pub fn y(&self) -> R

Source

pub fn z(&self) -> R

Source§

impl<R: RealField> EcefSpace<R>

Source

pub fn new(id: ContextoidId, x: R, y: R, z: R) -> Self

Trait Implementations§

Source§

impl<R: RealField + Default> Adjustable<R> for EcefSpace<R>

Grid positions 0 to 2 hold x, y, z. Position k is PointIndex::new1d(k) of a 1D grid, PointIndex::new2d(k, 0) of a 2D grid, PointIndex::new3d(0, 0, k) of a 3D grid and PointIndex::new4d(0, 0, k, 0) of a 4D grid.

Source§

fn update<const W: usize, const H: usize, const D: usize, const C: usize>( &mut self, array_grid: &ArrayGrid<R, W, H, D, C>, ) -> Result<(), UpdateError>

The default implementation does nothing to keep update optional. Override this method to implement a node update when needed. For a sample implementation, see src/types/context_types/node_types_adjustable
Source§

fn adjust<const W: usize, const H: usize, const D: usize, const C: usize>( &mut self, array_grid: &ArrayGrid<R, W, H, D, C>, ) -> Result<(), AdjustmentError>

The default implementation does nothing to keep adjustment optional. Override this method to implement a node adjustment when needed. Depending on the type of node adjustment, select a 1, 2,3, or 4 dimensional array grid that contains the transformation data to apply to the node. For a sample implementation, see src/types/context_types/node_types_adjustable
Source§

impl<R> Clone for EcefSpace<R>
where R: RealField + Clone,

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<R: RealField> Coordinate for EcefSpace<R>

Source§

fn dimension(&self) -> usize

Returns the number of dimensions in the coordinate system (always 3).

Source§

fn coordinate(&self, index: usize) -> Result<&R, IndexError>

Returns a reference to the coordinate value at the specified index.

§Index Mapping
  • 0 => x
  • 1 => y
  • 2 => z
§Errors

Returns IndexError if the index is out of bounds.

Source§

type Coord = R

The type each axis of this coordinate system is measured in.
Source§

impl<R> Debug for EcefSpace<R>
where R: RealField + Debug,

Source§

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

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

impl<R: RealField + Display> Display for EcefSpace<R>

Source§

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

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

impl<R: RealField> Distance for EcefSpace<R>

Source§

fn distance(&self, other: &Self) -> R

The distance between self and other, or NaN where the geometry defines none.
Source§

impl<R: RealField> Identifiable for EcefSpace<R>

Source§

fn id(&self) -> ContextoidId

Returns the unique id of this item.
Source§

impl<R> PartialEq for EcefSpace<R>
where R: RealField + PartialEq,

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<R: RealField + Into<f64> + FromPrimitive> Recordable<SpaceRecord> for EcefSpace<R>

Source§

fn to_record(&self) -> Result<SpaceRecord, ProjectionError>

The node as a record.
Source§

fn from_record( id: ContextoidId, record: SpaceRecord, ) -> Result<Self, ProjectionError>

The node a record describes, under the given identifier.
Source§

impl<R: RealField> Spatial for EcefSpace<R>

Source§

impl<R> StructuralPartialEq for EcefSpace<R>
where R: RealField + PartialEq,

Auto Trait Implementations§

§

impl<R> Freeze for EcefSpace<R>
where R: Freeze,

§

impl<R> RefUnwindSafe for EcefSpace<R>
where R: RefUnwindSafe,

§

impl<R> Send for EcefSpace<R>
where R: Send,

§

impl<R> Sync for EcefSpace<R>
where R: Sync,

§

impl<R> Unpin for EcefSpace<R>
where R: Unpin,

§

impl<R> UnsafeUnpin for EcefSpace<R>
where R: UnsafeUnpin,

§

impl<R> UnwindSafe for EcefSpace<R>
where R: UnwindSafe,

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<Borrowed> SampleBorrow<Borrowed> for Borrowed

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.