pub struct Ellipsoid {
pub type: Option<String>,
pub name: String,
pub semi_major_axis: Option<ValueInMetreOrValueAndUnit>,
pub semi_minor_axis: Option<ValueInMetreOrValueAndUnit>,
pub inverse_flattening: Option<ValueInMetreOrValueAndUnit>,
pub radius: Option<ValueInMetreOrValueAndUnit>,
pub id: Option<Id>,
pub ids: Ids,
}Expand description
§Ellipsoid
§Description
The <ellipsoid> object is an attribute of <geodetic reference frame>. It is not used with other types of datum.
ISO 19111 allows an oblate ellipsoid to be defined through semi-major axis (a) and either semi-minor axis (b) or inverse flattening (1/f). If semi-minor axis is used as the second defining parameter the value for inverse flattening to be shown in the WKT string should be calculated from $1/f = a / (a – b)$.
ISO 19111 also allows for the earth model to be a sphere, for which 1/f is infinite.
In this document if the earth model is a sphere <inverse flattening> shall be given an
artificial value of zero.
§Requirements:
a) The WKT representation of a sphere shall have an <inverse flattening> value of 0.
b) <length unit> is an optional attribute, optional for reasons of backward compatibility,
but it is recommended that it is explicitly included in WKT strings. Its <conversion factor>
shall be to metres and is the number of metres per unit. <length unit> is described in 7.4.
If it is omitted then the value for the length of the semi-axis or -axes shall be given in metres.
Conversely, if it is omitted then the value for the semi-major axis shall be assumed to be in
metres.
§Note:
- In the WKT for a geodetic, geographic or projected CRS, the length unit for the ellipsoid may differ from the length unit for the coordinate system. The units in which coordinates are expressed are given by the CS element.
- In this document the preferred keyword is ELLIPSOID. SPHEROID is permitted for backward compatibility. Implementations should be prepared to read both forms.
§Examples of WKT describing an ellipsoid:
ELLIPSOID["GRS 1980",6378137,298.257222101,LENGTHUNIT["metre",1.0]]SPHEROID["GRS 1980",6378137.0,298.257222101](unit = metre is implied)ELLIPSOID["Clark 1866",20925832.164,294.97869821, LENGTHUNIT["US survey foot",0.304800609601219]]ELLIPSOID["Sphere",6371000,0,LENGTHUNIT["metre",1.0]]
The definition of WKT for a triaxial ellipsoid required for planetary mapping is given in Annex E.
Fields§
§type: Option<String>Indicates the type of ellipsoid. Always “Ellipsoid” for this interface.
name: StringThe name of the ellipsoid.
semi_major_axis: Option<ValueInMetreOrValueAndUnit>The semi-major axis of the ellipsoid. Represented as a number or a value with a unit.
semi_minor_axis: Option<ValueInMetreOrValueAndUnit>The semi-minor axis of the ellipsoid.
Represented as a number or a value with a unit.
Required when inverse_flattening is not provided.
inverse_flattening: Option<ValueInMetreOrValueAndUnit>The inverse flattening of the ellipsoid.
Required when semi_minor_axis is not provided.
radius: Option<ValueInMetreOrValueAndUnit>The radius of the ellipsoid, used for spherical representations.
Required when neither semi_minor_axis nor inverse_flattening are provided.
id: Option<Id>An identifier for the datum ensemble.
ids: IdsAn array of identifiers for the datum ensemble.
Implementations§
Source§impl Ellipsoid
impl Ellipsoid
Sourcepub fn to_projection_transform(&self, proj_transform: &mut ProjectionTransform)
pub fn to_projection_transform(&self, proj_transform: &mut ProjectionTransform)
Convert a Ellipsoid to a ProjectionTransform
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Ellipsoid
impl<'de> Deserialize<'de> for Ellipsoid
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl ToProjJSON for Ellipsoid
impl ToProjJSON for Ellipsoid
Source§fn set_usage(&mut self, _usage: ObjectUsage)
fn set_usage(&mut self, _usage: ObjectUsage)
Source§fn set_anchor(&mut self, _anchor: String)
fn set_anchor(&mut self, _anchor: String)
Source§fn set_coordinate_system(&mut self, _cs: CoordinateSystem)
fn set_coordinate_system(&mut self, _cs: CoordinateSystem)
Source§fn set_temporal_extent(&mut self, _extent: TemporalExtent)
fn set_temporal_extent(&mut self, _extent: TemporalExtent)
Source§fn set_vertical_extent(&mut self, _extent: VerticalExtent)
fn set_vertical_extent(&mut self, _extent: VerticalExtent)
Source§fn set_method(&mut self, _method: Method)
fn set_method(&mut self, _method: Method)
Source§fn set_ensemble(&mut self, _ensemble: DatumEnsemble)
fn set_ensemble(&mut self, _ensemble: DatumEnsemble)
Source§fn set_member(&mut self, _member: DatumEnsembleMember)
fn set_member(&mut self, _member: DatumEnsembleMember)
Source§fn set_ellipsoid(&mut self, _ellipsoid: Ellipsoid)
fn set_ellipsoid(&mut self, _ellipsoid: Ellipsoid)
Source§fn set_accuracy(&mut self, _accuracy: String)
fn set_accuracy(&mut self, _accuracy: String)
Source§fn set_frame_epoch(&mut self, _epoch: f64)
fn set_frame_epoch(&mut self, _epoch: f64)
Source§fn set_parameter(&mut self, _parameter: ParameterValue)
fn set_parameter(&mut self, _parameter: ParameterValue)
Source§fn set_meridian(&mut self, _meridian: Meridian)
fn set_meridian(&mut self, _meridian: Meridian)
Source§fn set_prime_meridian(&mut self, _prime_meridian: PrimeMeridian)
fn set_prime_meridian(&mut self, _prime_meridian: PrimeMeridian)
Source§fn set_conversion(&mut self, _conversion: Conversion)
fn set_conversion(&mut self, _conversion: Conversion)
Source§fn set_geodetic_crs(&mut self, _geodetic_crs: GeodeticCRS)
fn set_geodetic_crs(&mut self, _geodetic_crs: GeodeticCRS)
Source§fn set_projected_crs(&mut self, _projected_crs: ProjectedCRS)
fn set_projected_crs(&mut self, _projected_crs: ProjectedCRS)
Source§fn set_projection(&mut self, _name: String)
fn set_projection(&mut self, _name: String)
impl StructuralPartialEq for Ellipsoid
Auto Trait Implementations§
impl Freeze for Ellipsoid
impl RefUnwindSafe for Ellipsoid
impl Send for Ellipsoid
impl Sync for Ellipsoid
impl Unpin for Ellipsoid
impl UnwindSafe for Ellipsoid
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().