import type { CitySource } from '../source/types'; export interface GroundModel { readonly kind: 'flat' | 'dem'; /** Scene-Y metres of the BARE EARTH at plan (x, z). Bilinear, total (clamps outside the raster). Deterministic. */ heightAt(x: number, z: number): number; /** The building-masked, inpainted, lightly smoothed raster (null for flat). Same sample layout as the source DEM. */ readonly grid: { samplesX: number; samplesZ: number; originX: number; originZ: number; metresPerSample: number; heights: Float32Array; } | null; readonly stats: { totalSamples: number; maskedSamples: number; maskedFraction: number; maxLoweredM: number; }; } export interface GroundOptions { /** A DEM sample is masked when buildings cover at least this share of its footprint cell. Default 0.25. */ buildingMaskFraction?: number; /** Light smoothing passes over the masked samples only. Default 1. */ smoothPasses?: number; } /** * Bare-earth ground for a city source. `flat` terrain is a constant, no terrain is flat at y = 0, a `dem` is decoded, * masked under building footprints (outer rings minus holes, and parts) and inpainted from the unmasked ground around. * Samples that no building covers enough are bit-identical to the source DEM. */ export declare function buildGroundModel(source: CitySource, options?: GroundOptions): GroundModel;