/** * Bundled coordinate reference systems, shared by every decoder that has to * turn projected coordinates into lon/lat. * * Extracted from cityjson.ts so the IFC path can reuse it. An IFC file's * `IfcMapConversion` states its position in a projected CRS named by * `IfcProjectedCRS`, exactly as CityJSON states one in * `metadata.referenceSystem`, so both need the same table and the same lazy * proj4 import. Duplicating it would have meant a Dutch model georeferencing * correctly as CityJSON and 108 m out as IFC. * * proj4 is imported LAZILY at the point of use, never at module scope: most * files need no projection at all, and the ones that do are already paying for * a parse. */ export interface CrsEntry { def: string; /** Source stores [northing, easting] / [lat, lon] — swap before handing to proj4. */ swapXY?: boolean; /** Already angular: no reprojection, but horizontal metrics need a local metric frame. */ geographic?: boolean; } /** Compound (horizontal + vertical) codes → the horizontal component that actually projects. */ export declare const COMPOUND_TO_HORIZONTAL: Record; export declare const CRS_DEFS: Record; /** The EPSG codes this build can convert without help. */ export declare function bundledCrsCodes(): number[]; /** * Projected (or geographic) coordinates in EPSG:`code` -> `[lon, lat]`. * * Returns null when the code is not bundled, which callers must treat as "I * cannot place this" rather than silently substituting something else — a * wrong position looks exactly like a right one. * * `x`/`y` are given easting-first; entries flagged `swapXY` (Japan's plane * systems, RD's formal axis order) are swapped here so callers never have to * know which convention a CRS uses. */ export declare function projectedToLonLat(code: number, x: number, y: number): Promise<[number, number] | null>; /** * Bearing of the projection's GRID north at a point, in degrees clockwise from * true north — the grid convergence. * * Measured rather than derived: unproject the point and a second one a short * step further north IN GRID SPACE, then take the true bearing between them. * That works for any projection in the table without per-CRS formulae, and it * matters because a model aligned to a national grid is NOT aligned to true * north. Dutch RD at Rotterdam is off by -0.735 degrees. */ export declare function gridConvergence(code: number, x: number, y: number, step?: number): Promise;