import type { REdge, RoadNetwork } from './network'; export interface GroundHeight { /** Scene Y at plan (x, z); z is south-positive (the city-source frame), NOT the map frame. */ heightAt(x: number, z: number): number; } /** Headroom wanted between a deck's underside and the road below it: 4.5 m, and 5.5 m over a motorway or trunk road. */ export declare const HEADROOM_TARGET_M = 4.5; export declare const HEADROOM_TARGET_MOTORWAY_M = 5.5; /** * Where a deck crosses a road that lies at grade, the road below goes into a cut (a trench) instead of the deck and its whole * approach chain climbing: in a dense downtown the DEM does not resolve the freeway trenches, so clearing them by lifting would * float the street grid tens of metres over the terrain (Los Angeles: 762 street edges, up to 30 m). The cut is at most this deep, * flat for `TRENCH_PLATEAU_M` either side of the crossing, and runs in and out at `TRENCH_GRADE`. */ export declare const MAX_TRENCH_M = 9; /** The thickness of an edge's deck: top of the slab to the underside of the girders. */ export declare const deckThickness: (edge: REdge) => number; /** The headroom wanted over `lower`. */ export declare const headroomTarget: (lower: REdge) => number; export interface ElevationStats { nodes: number; edges: number; /** Edges whose end heights could not honour the grade cap within the relaxation. */ gradeViolations: number; maxGrade: number; bridges: number; /** The most any bridge deck was lifted above the straight line between its abutments to clear what lies under it. */ maxBridgeLiftM: number; relaxationIterations: number; /** Places (4 m samples) where a deck passes over a road of a lower layer that it does not join at a node. */ gradeSeparatedSamples: number; /** Smallest headroom between a deck's underside and the road surface below it, over those samples (metres; Infinity when none). */ minCrossingHeadroomM: number; /** Samples with less than 4 m of headroom (the grade cap did not leave room to climb). */ crossingsBelowHeadroom: number; /** Samples under their target (4.5 m, 5.5 m over a motorway) after the abutments were raised. */ crossingsBelowTarget: number; /** Distinct (deck, road below) pairs, and how many of them have a sample under 4 m / under target. */ crossingPairs: number; crossingPairsBelow4m: number; crossingPairsBelowTarget: number; /** Abutment nodes raised so an approach climbs ahead of its deck, and the passes that took. */ abutmentsRaised: number; headroomPasses: number; /** Edges drawn as decks: bridges plus freeway edges that stand well above the ground. */ deckEdges: number; /** Roads cut into the ground to pass under a deck (trenches), and the deepest cut in metres. */ trenches: number; maxTrenchM: number; /** The steepest grade of an edge with a cut in it (`maxGrade` is the steepest of every other edge). */ maxTrenchGrade: number; /** The crossings still under target after the repair, worst first (at most 40): deck edge, road below, headroom and target in metres. */ headroomRemainder: Array<{ deck: string; under: string; headroomM: number; targetM: number; deckLengthM: number; }>; } export declare function bridgeClearance(edge: REdge): number; /** Height of an edge's profile at arclength s. */ export declare function profileHeight(edge: REdge, s: number): number; export declare function computeElevation(net: RoadNetwork, ground: GroundHeight, authoritative: boolean): ElevationStats; interface Trench { s: number; depth: number; ask: number; } /** How far below its natural profile the road is cut at arclength `s`: a flat bottom, then in and out at TRENCH_GRADE. */ export declare function trenchDip(cut: Trench, s: number): number; export {};