pub struct GeoReference {Show 19 fields
pub crs_name: Option<String>,
pub crs_description: Option<String>,
pub geodetic_datum: Option<String>,
pub vertical_datum: Option<String>,
pub map_projection: Option<String>,
pub map_zone: Option<String>,
pub map_unit: Option<String>,
pub map_unit_scale: Option<f64>,
pub source: Option<GeoRefSource>,
pub eastings: f64,
pub northings: f64,
pub orthogonal_height: f64,
pub x_axis_abscissa: f64,
pub x_axis_ordinate: f64,
pub scale: f64,
pub factor_x: f64,
pub factor_y: f64,
pub factor_z: f64,
pub has_map_conversion: bool,
}Expand description
Georeferencing information extracted from IFC model
Fields§
§crs_name: Option<String>CRS name (e.g., “EPSG:32632”)
crs_description: Option<String>CRS description from IfcProjectedCRS.Description.
geodetic_datum: Option<String>Geodetic datum (e.g., “WGS84”)
vertical_datum: Option<String>Vertical datum (e.g., “NAVD88”)
map_projection: Option<String>Map projection (e.g., “UTM Zone 32N”)
map_zone: Option<String>Map zone (e.g., “32N”) from IfcProjectedCRS.MapZone.
map_unit: Option<String>Map unit name resolved from IfcProjectedCRS.MapUnit
(e.g. “METRE”, “MILLIMETRE”). None when no MapUnit is authored —
per spec the project length unit then applies.
map_unit_scale: Option<f64>Scale factor converting MapConversion values to metres, derived from
MapUnit (0.001 for millimetres). None when no MapUnit is authored.
source: Option<GeoRefSource>Where the data was authored (IfcMapConversion, ePSet fallback, or
legacy IfcSite lat/long). None when only a named
IfcProjectedCRS was found: no conversion was authored, or the one
authored was refused, so nothing placed the model. The TS twin leaves
source unset in the same case.
eastings: f64False easting (X offset to map CRS)
northings: f64False northing (Y offset to map CRS)
orthogonal_height: f64Orthogonal height (Z offset)
x_axis_abscissa: f64X-axis abscissa (cos of rotation angle)
x_axis_ordinate: f64X-axis ordinate (sin of rotation angle)
scale: f64Scale factor (default 1.0)
factor_x: f64Per-axis factors from IfcMapConversionScaled.FactorX/Y/Z (IFC4X3),
each 1.0 when absent. Per the schema they scale coordinates, not
units (scale converts units): each multiplies its own local axis
before the rotation, on top of scale. Ignoring them applied a
conversion authored with factors of 0.3048 at 3.28x.
factor_y: f64§factor_z: f64§has_map_conversion: boolTrue once an IfcMapConversion (or its Scaled subtype) was parsed.
Presence is then reported even for a conversion whose translations are
all zero (a rotation- or scale-only conversion), matching the TS
twin, which sets hasGeoreference whenever a conversion parsed.
Implementations§
Source§impl GeoReference
impl GeoReference
Sourcepub fn has_georef(&self) -> bool
pub fn has_georef(&self) -> bool
Check if georeferencing is present.
A parsed IfcMapConversion is presence on its own: the value test
alone dropped a rotation-only conversion (zero offsets, 30 degrees to
grid north) as “no georeferencing” while the browser reported one.
Sourcepub fn local_to_map(&self, x: f64, y: f64, z: f64) -> (f64, f64, f64)
pub fn local_to_map(&self, x: f64, y: f64, z: f64) -> (f64, f64, f64)
Transform local coordinates to map coordinates
Per IFC4x3 IfcMapConversion: “a scaling of the three axes (x,y,z),
by the same Scale, followed by an anti-clockwise rotation about the
z-axis […] and then a translation in (x,y,z) of Eastings,
Northings, OrthogonalHeight” — note the Scale applies to z as well
(“one scale is applied equally to x, y and z, to convert units”).
IfcMapConversionScaled adds a per-axis factor on top of that.
Trait Implementations§
Source§impl Clone for GeoReference
impl Clone for GeoReference
Source§fn clone(&self) -> GeoReference
fn clone(&self) -> GeoReference
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more