Derive map units from IFC scale

Use IfcMapConversion.Scale as the source of truth for converting map coordinates to metres, instead of deriving that scale from IfcProjectedCRS.MapUnit. Bump the sidecar version because cached georef matrices and unit scales may differ under the new interpretation.

Generated with the assistance of an AI coding tool.
This commit is contained in:
Dion Moult
2026-05-19 18:58:17 +10:00
parent e0a504417c
commit 6ca38f8bf6
7 changed files with 41 additions and 24 deletions
+3 -1
View File
@@ -63,7 +63,9 @@ static constexpr uint32_t SIDECAR_MAGIC = 0x49465657; // "IFVW"
// InstanceChunk carries the streamer placement as double[16]. This keeps
// large IFC placements exact until CoordinateOperation / FederatedFalseOrigin
// composition has reduced them to viewport-local float-sized values.
static constexpr uint32_t SIDECAR_VERSION = 12;
// v13 = Map unit scale in cached ModelGeoref is derived from
// IfcMapConversion.Scale, not IfcProjectedCRS.MapUnit.
static constexpr uint32_t SIDECAR_VERSION = 13;
static constexpr uint32_t SIDECAR_ENDIAN = 0x01020304;
// Fixed-size element record. Strings are stored as (offset, length) pairs