IFClite TypeScript API
    Preparing search index...

    Function findStoreyByElevation

    • Resolve the storey whose elevation is nearest z, or null when none is within STOREY_ELEVATION_MATCH_TOLERANCE_M.

      Exact-distance ties resolve to the lower storeyId, NOT to iteration order. That determinism is the point of this being one shared function: the parser and the server-loaded path insert storeys into their maps in different orders, so an order-dependent tie-break would let the same building still answer differently across entry paths — the exact drift #1841 is about.

      Parameters

      • storeyElevations: Iterable<readonly [number, number]>

        storeyId -> elevation in metres. An empty collection (the cache-restore path, which has no source buffer) yields null.

      • z: number

        elevation to match, in metres.

      Returns number | null