Skip to main content

ProjectToMap

Struct ProjectToMap 

Source
#[non_exhaustive]
pub struct ProjectToMap {
Show 13 fields pub source_crs: EntityId, pub source: OperationSource, pub operation: EntityId, pub kind: OperationKind, pub target_crs: ProjectedCrs, pub transform: Transform3, pub eastings: f64, pub northings: f64, pub orthogonal_height: f64, pub project_unit: LengthUnit, pub map_unit: LengthUnit, pub declared_scale: f64, pub x_axis_direction: (f64, f64), /* private fields */
}
Expand description

A resolved project-to-map coordinate operation, normalised to metres.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§source_crs: EntityId

The operation’s SourceCRS, an IfcCoordinateReferenceSystemSelect: an IfcGeometricRepresentationContext or an IfcCoordinateReferenceSystem, in IFC4 and IFC4X3 alike. source says which.

§source: OperationSource

The validated source, typed.

§operation: EntityId

The coordinate-operation entity this was resolved from.

§kind: OperationKind

Which subtype operation is, with its subtype-only attributes.

§target_crs: ProjectedCrs

The target projected CRS.

§transform: Transform3

Affine operation from neutral project metres to neutral map metres.

Only with the default transform feature. The same operation is always available as plain numbers through Self::map_point, Self::linear_part and Self::translation.

§eastings: f64

Eastings as authored, in map_unit. For a rigid operation, FirstCoordinate, the offset along the target CRS’s first axis.

§northings: f64

Northings as authored, in map_unit. For a rigid operation, SecondCoordinate, the offset along the target CRS’s second axis.

§orthogonal_height: f64

OrthogonalHeight as authored, in map_unit. For a rigid operation, Height, or 0.0 when the file states none (see OperationKind::RigidOperation).

§project_unit: LengthUnit

Length unit the project authored its coordinates in.

§map_unit: LengthUnit

Length unit the map coordinates are expressed in, resolved: the target CRS’s MapUnit when stated, otherwise the project length unit, which IFC prescribes for an omitted MapUnit. transform, Self::map_point and Self::translation use this unit. Whether the file stated it is Self::declared_map_unit.

§declared_scale: f64

IFC’s declared scale before source/target unit normalization. 1.0 for a rigid operation, which has none.

§x_axis_direction: (f64, f64)

Normalized (XAxisAbscissa, XAxisOrdinate): the project’s local X axis, as a unit vector, expressed in the map’s XY plane. Exposed (rather than only folded into transform) because grid-north resolution needs the rotation alone, without transform’s scale and translation. (1, 0) for a rigid operation.

Implementations§

Source§

impl ProjectToMap

Source

pub fn map_point(&self, point: [f64; 3]) -> [f64; 3]

Carry a point from project metres to map metres.

Plain arithmetic on the resolved parameters, identical to transform.transform_point3 (same operation order, so the same rounding) and available without the transform feature.

Source

pub fn linear_part(&self) -> [[f64; 3]; 3]

The linear part, metres to metres, as three columns: the images of the project’s unit X, Y and Z axes. Scale, unit conversion, per-axis factors and rotation are folded in.

Source

pub fn declared_map_unit(&self) -> Option<&LengthUnit>

The target CRS’s MapUnit exactly as authored: None when the file leaves it unset, even though Self::map_unit then resolves to the project length unit. With MapUnit stated, this and map_unit are the same unit.

The value is ProjectedCrs::map_unit of Self::target_crs; this accessor names it next to the resolved unit (#296).

Source

pub fn translation(&self) -> [f64; 3]

The translation in map metres: where the project origin lands. [eastings, northings, orthogonal_height] converted from map_unit to metres.

Trait Implementations§

Source§

impl Clone for ProjectToMap

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 Debug for ProjectToMap

Source§

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

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

impl PartialEq for ProjectToMap

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 ProjectToMap

Auto Trait Implementations§

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

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, 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.