#[non_exhaustive]pub struct MapConversion {
pub crs_name: String,
pub map_unit: MapUnit,
pub eastings: f64,
pub northings: f64,
pub orthogonal_height: f64,
pub x_axis_abscissa: f64,
pub x_axis_ordinate: f64,
pub scale: Option<f64>,
}Expand description
An IfcMapConversion to an IfcProjectedCRS: how the project’s
engineering frame (metres) maps to map coordinates.
x_axis_abscissa and x_axis_ordinate are the direction of the
engineering frame’s X axis in map coordinates; together they carry the
rotation between grid north and the project’s Y axis. They need not be
normalised, but cannot both be zero.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.crs_name: StringIfcProjectedCRS.Name, for example EPSG:2056.
map_unit: MapUnitThe unit eastings, northings and orthogonal_height are in,
written as the CRS’s MapUnit. Without one IFC reads map coordinates
in the project’s length unit (metre), which is wrong for a feet-based
CRS such as a US State Plane zone.
eastings: f64§northings: f64§orthogonal_height: f64§x_axis_abscissa: f64§x_axis_ordinate: f64§scale: Option<f64>None writes $, which IFC4 reads as 1.
Implementations§
Source§impl MapConversion
impl MapConversion
Sourcepub fn new(
crs_name: impl Into<String>,
eastings: f64,
northings: f64,
orthogonal_height: f64,
) -> Self
pub fn new( crs_name: impl Into<String>, eastings: f64, northings: f64, orthogonal_height: f64, ) -> Self
A conversion to the projected CRS crs_name, with the engineering
origin at eastings, northings and orthogonal_height in metres,
no rotation (X along grid east) and no scale.
pub fn with_map_unit(self, map_unit: MapUnit) -> Self
Sourcepub fn with_x_axis(self, abscissa: f64, ordinate: f64) -> Self
pub fn with_x_axis(self, abscissa: f64, ordinate: f64) -> Self
The engineering X axis in map coordinates; see the field docs.
pub fn with_scale(self, scale: f64) -> Self
Trait Implementations§
Source§impl Clone for MapConversion
impl Clone for MapConversion
Source§fn clone(&self) -> MapConversion
fn clone(&self) -> MapConversion
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for MapConversion
impl RefUnwindSafe for MapConversion
impl Send for MapConversion
impl Sync for MapConversion
impl Unpin for MapConversion
impl UnwindSafe for MapConversion
Blanket Implementations§
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<U>,
fn as_<T>(self) -> Twhere
T: CastFrom<U>,
self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. Read moreSource§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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.