/** Closing radius, in cells (7 m), that defines a trench: anything narrower than about twice this is a channel. */ export declare const CHANNEL_CLOSE_CELLS = 10; /** A cell is in a trench when the closed terrain stands this far above it. */ export declare const CHANNEL_MIN_DEPTH_M = 3; /** Smallest channel, in cells (about one hectare). */ export declare const CHANNEL_MIN_CELLS = 200; /** Most of a channel's cells that may touch simulated water. */ export declare const CHANNEL_MAX_SHORE_FRACTION = 0.1; /** Highest bed above the water the channel opens onto. */ export declare const CHANNEL_MAX_ABOVE_WATER_M = 4; export declare const CHANNEL_FLAT_BAND_M = 1.5; export declare const CHANNEL_MIN_FLAT_FRACTION = 0.6; export declare const CHANNEL_MAX_ROAD_FRACTION = 0.15; /** Water stands this far above the channel's bed (10th percentile of its ground). */ export declare const CHANNEL_FILL_M = 1.5; export interface DryChannelInput { width: number; height: number; /** Simulated depth per cell (row-major, `j * width + i`), 0 = dry. */ depths: ArrayLike; /** A cell counts as wet from this depth. */ minDepthM: number; /** Ground height per cell, any datum (same as the water surface's). */ ground: Float32Array; /** 1 where an at-grade carriageway covers the cell. */ roads?: Uint8Array; } export interface DryChannel { /** Flat indices of the cells that take water (ground below the fill level). */ cells: number[]; /** Water depth of each of `cells`, same order. */ depths: number[]; bedM: number; levelM: number; /** The level of the water the channel opens onto (median ground + depth of the wet cells around its mouth). */ mouthLevelM: number; } export interface DryChannelReport { channels: DryChannel[]; /** Candidates turned down, by the first rule they failed. */ refused: Record; } export declare function findDryChannels(input: DryChannelInput): DryChannelReport; /** Marks the cells under at-grade carriageways (not bridges or tunnels): `toCell` maps a scene point to a flat cell index, or -1 off the grid. */ export declare function roadMask(W: number, H: number, edges: ReadonlyArray<{ pts: ReadonlyArray; widthM?: number; structure?: string; }>, toCell: (x: number, z: number) => number, cellM: number): Uint8Array;