pub struct GeoReference {Show 15 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: GeoRefSource,
pub eastings: f64,
pub northings: f64,
pub orthogonal_height: f64,
pub x_axis_abscissa: f64,
pub x_axis_ordinate: f64,
pub scale: f64,
}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: GeoRefSourceWhere the data was authored (IfcMapConversion, ePSet fallback, or
legacy IfcSite lat/long).
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)
Implementations§
Source§impl GeoReference
impl GeoReference
Sourcepub fn has_georef(&self) -> bool
pub fn has_georef(&self) -> bool
Check if georeferencing is present
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”).
Trait Implementations§
Source§impl Clone for GeoReference
impl Clone for GeoReference
Source§fn clone(&self) -> GeoReference
fn clone(&self) -> GeoReference
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more