Skip to main content

ifc_georef/
lib.rs

1//! IFC project-to-map coordinate operations.
2//!
3//! This crate resolves IFC references, units, axis defaults, and CRS metadata
4//! into plain-number operation parameters and, with the default `transform`
5//! feature, a format-neutral `axiolid_core::Transform3`. It does not place
6//! products, reproject coordinates, or select a geometry backend.
7//!
8//! IFC4 and IFC4X3 state georeferencing as `IfcCoordinateOperation`
9//! entities ([`resolve_project_to_map`]); IFC2X3, which declares none, as
10//! the `ePSet_MapConversion` and `ePSet_ProjectedCRS` property sets of the
11//! buildingSMART geo-referencing guide
12//! ([`resolve_property_set_georeferencing`]). Both resolve to the same
13//! [`ProjectToMap`]; the declared release decides which is read.
14//!
15//! # Features
16//!
17//! - `transform` (default): links `axiolid-core` and adds
18//!   `ProjectToMap::transform` and `compose_project_frame`. With
19//!   `default-features = false` the crate links no geometry crate and still
20//!   exposes every resolved parameter: CRS metadata and units, eastings,
21//!   northings and height, axis direction, scale and IFC4X3 factors, the
22//!   affine parts through [`ProjectToMap::map_point`], true and grid north,
23//!   operation sources and the site reference.
24
25pub mod authoring;
26mod context;
27mod conversion;
28mod crs;
29mod error;
30mod north;
31mod site;
32mod slot;
33mod view;
34
35pub use authoring::{
36    create_angular_rigid_operation, create_direction, create_geographic_crs, create_map_conversion,
37    create_map_conversion_scaled, create_projected_crs, create_representation_context,
38    create_representation_subcontext, create_rigid_operation, create_well_known_text,
39    GeographicCrsDraft, MapConversionDraft, ProjectedCrsDraft,
40};
41#[cfg(feature = "transform")]
42pub use context::compose_project_frame;
43pub use context::{coordinate_operation_for, resolve_operation_source, OperationSource};
44pub use conversion::{
45    has_property_set_georeferencing, resolve_geographic_offset_in, resolve_project_to_map,
46    resolve_project_to_map_in, resolve_property_set_georeferencing, GeographicOffset,
47    OperationKind, ProjectToMap, MAP_CONVERSION_PSET, PROJECTED_CRS_PSET,
48};
49pub use crs::{AngleUnit, GeographicCrs, LengthUnit, ProjectedCrs};
50pub use error::{GeorefError, GeorefResult};
51pub use north::{
52    grid_north_direction, project_north_direction, resolve_true_north, NorthReference,
53};
54pub use site::{
55    relate_site_elevation, site_reference, CompoundPlaneAngle, SiteElevationCheck,
56    SiteElevationComparison, SiteReference, SITE_ELEVATION_TOLERANCE_M,
57};
58pub use view::GeorefView;