IFClite TypeScript API
    Preparing search index...

    Function computeGridConvergence

    • Grid (meridian) convergence at a point in a projected CRS: the angle between grid north (the projected CRS's +N axis) and true north (the geographic ENU +N axis). Returned in radians, counter-clockwise positive, such that the grid frame equals the true-ENU frame rotated by +gamma.

      WHY THIS EXISTS: IfcMapConversion aligns the model to GRID north (its XAxisAbscissa/Ordinate are expressed in the projected grid), but Cesium's eastNorthUpToFixedFrame() builds a TRUE-north ENU frame. Feeding the grid-aligned model straight into that frame rotates it by the convergence — up to ~3° for UTM near a zone edge, ~7-8° for oblique projections like Krovak (EPSG:2065, S-JTSK / Czech Republic). See issue #1408.

      Computed by finite difference through proj4 (computeGridPointFactors) so it works for any projection (TM, LCC, Krovak, ...) without per-projection convergence formulae. A geographic (longlat) def has zero convergence by definition. The step is measured on the WGS84 ellipsoid: the spherical 111320 m/degree it used before turned a 2.2° UTM convergence into an angle off by 1e-4 rad (7.6 mm per 100 m).

      Parameters

      • projDef: string
      • easting: number
      • northing: number
      • lat: number

      Returns number