#[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
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.source_crs: EntityIdThe operation’s SourceCRS, an
IfcCoordinateReferenceSystemSelect: an
IfcGeometricRepresentationContext or an
IfcCoordinateReferenceSystem, in IFC4 and IFC4X3 alike. source
says which.
source: OperationSourceThe validated source, typed.
operation: EntityIdThe coordinate-operation entity this was resolved from.
kind: OperationKindWhich subtype operation is, with its subtype-only attributes.
target_crs: ProjectedCrsThe target projected CRS.
transform: Transform3Affine 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: f64Eastings as authored, in map_unit. For a rigid operation,
FirstCoordinate, the offset along the target CRS’s first axis.
northings: f64Northings as authored, in map_unit. For a rigid operation,
SecondCoordinate, the offset along the target CRS’s second axis.
orthogonal_height: f64OrthogonalHeight as authored, in map_unit. For a rigid
operation, Height, or 0.0 when the file states none (see
OperationKind::RigidOperation).
project_unit: LengthUnitLength unit the project authored its coordinates in.
map_unit: LengthUnitLength 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: f64IFC’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
impl ProjectToMap
Sourcepub fn map_point(&self, point: [f64; 3]) -> [f64; 3]
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.
Sourcepub fn linear_part(&self) -> [[f64; 3]; 3]
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.
Sourcepub fn declared_map_unit(&self) -> Option<&LengthUnit>
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).
Sourcepub fn translation(&self) -> [f64; 3]
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.