import { type LatLngBoundsLike } from "../geo.js"; import { type HeatContoursWasmProfile } from "./heat-isolines-wasm.js"; import { type HeatFieldGrid, type HeatFieldInput } from "./heat-field.js"; import type { AdaptiveIsolineLevelSelection } from "./adaptive-isoline-levels.js"; export { buildHeatContoursWasm, buildHeatContoursWasmUnsafe, decodeHeatContoursWasmBlob, heatContoursWasmError, heatContoursWasmSupported, type HeatContoursWasmProfile, type PackedHeatContours } from "./heat-isolines-wasm.js"; export type HeatIsolineInput = HeatFieldInput; export type { HeatFieldGrid } from "./heat-field.js"; export interface HeatIsolineBuildOptions { /** Grid columns (default 96). */ cols?: number; /** Grid rows (default 72). */ rows?: number; /** Geographic kernel radius expressed as CSS px at `scaleZoom`. Default 28. */ radius?: number; blur?: number; /** Fixed reference zoom that defines the world-space kernel. */ scaleZoom?: number; /** Current map zoom. It changes sampling density, never the world-space kernel. */ zoom?: number; /** * Contour levels. Values <=1 are fractions of `referenceMax` when supplied, * otherwise fractions of the current grid peak for backwards compatibility. * Values >1 are absolute field values. */ levels?: number | number[]; /** Absolute difference between adjacent contour values. Default `"auto"`. */ isolineStep?: "auto" | number; /** Safety cap for automatically/manual-step generated levels. Default 32. */ maxIsolineLevels?: number; /** Spatially optimize automatic levels. Unified async pipeline default: true. */ adaptiveLevels?: boolean; /** Valid cells; zero cells and NoData are excluded from selection and marching. */ validMask?: ArrayLike | null; /** Robust automatic value range. Default `[0.02, 0.98]`. */ outlierQuantiles?: [number, number]; /** Automatic candidate count multiplier, constrained to 5..20. Default 10. */ candidateMultiplier?: number; /** Spatial coverage influence radius in evaluation-zone cells. */ coverageRadius?: number; /** Candidate preview must cross at least this many field cells. */ minCandidateCells?: number; /** Remove final lines shorter than this many grid-cell units. */ minIsolineLength?: number; /** Remove final closed rings smaller than this many grid-cell² units. */ minIsolineArea?: number; coverageWeight?: number; rangeWeight?: number; redundancyWeight?: number; fragmentWeight?: number; /** * Fixed field maximum used for color/level normalization across zooms. * Set this for zoom-invariant value semantics (for normalized sensor values use 1). */ referenceMax?: number; /** Skip rebuilding if max density is below this. Default 1e-6. */ minPeak?: number; /** Whole-grid WASM marching+stitching. Default true; falls back to JS on failure. */ useWasm?: boolean; /** Internal A/B hook. */ __forceJsContours?: boolean; /** Internal benchmark/profile hook. */ __heatContoursWasmProfile?: HeatContoursWasmProfile; } export interface HeatIsolineRing { /** Stable index within the selected level array. */ levelId?: number; /** Contour threshold in absolute field units. */ value: number; /** Normalized 0..1 vs `referenceMax` (or local peak when not supplied). */ t: number; /** Closed or open rings as [lat, lng][]. */ coordinates: Array<[number, number]>; /** Length in scalar-grid cell units. */ gridLength?: number; /** Closed area in scalar-grid cell² units; zero for open lines. */ gridArea?: number; /** Marginal spatial coverage contributed by this adaptive level. */ gain?: number; } export interface HeatIsolineResult { cols: number; rows: number; peak: number; rings: HeatIsolineRing[]; /** Actual absolute contour thresholds used for this field. */ thresholds?: number[]; /** Uniform threshold step, when the selected levels are evenly spaced. */ isolineStep?: number; /** True when marching+stitching was produced by the whole-grid WASM kernel. */ wasm?: boolean; /** Scalar-field backend. Contours still use WASM whenever available. */ fieldBackend?: "js" | "wasm" | "webgpu"; /** Spatial level-selection diagnostics when adaptive auto mode was used. */ levelSelection?: AdaptiveIsolineLevelSelection; } /** * Build a zoom-invariant world-space heat field and extract isolines. * The kernel is fixed in normalized Web Mercator by `radius@scaleZoom`; zoom only * changes how densely that same mathematical field is sampled on screen. */ export declare function buildHeatIsolines(points: Iterable, boundsLike: LatLngBoundsLike, options?: HeatIsolineBuildOptions): HeatIsolineResult; /** Extract contours from an already-built field. `both` mode uses this path. */ export declare function buildHeatIsolinesFromField(field: HeatFieldGrid, options?: HeatIsolineBuildOptions): HeatIsolineResult; /** * Scalar field only. Exported so benchmarks/tools can separate field construction * from marching/stitching. No viewport-local normalization is applied. */ export declare function buildHeatFieldGrid(points: Iterable, boundsLike: LatLngBoundsLike, options?: HeatIsolineBuildOptions): HeatFieldGrid | null; //# sourceMappingURL=heat-isolines.d.ts.map