/** * The delineation-keyed cell index, plus the partial-cell and mixed-top-class * shares that choose its resolution. */ import { type FeatureCells, type MultiPolygonRings } from "@mailwoman/spatial"; import { type H3Cell } from "@sister.software/h3"; /** * The label assigned to this layer's classifier failures. */ export declare const SOIL_CELL_LABEL = "soil cells"; /** * Classify one delineation — {@link classifyFeatureCells} with this layer's label bound. */ export declare function classifyDelineationCells(polygons: MultiPolygonRings, targetResolution: number, areaID: string): FeatureCells; /** * What one resolution's index came out as. */ export interface SoilCellIndexMeasurement { resolution: number; /** * Cells the layer reaches at all. */ touchedCells: number; /** * Cells lying wholly inside a single delineation, before compaction. */ wholeCells: number; /** * Cells a delineation boundary crosses. */ partialCells: number; /** * `partialCells / touchedCells`, the share of in-layer probes that cannot * be answered using only the index. */ partialShare: number; /** * Whole cells after `compactCells`, expected to be close to `wholeCells` here * because small delineations do not produce a uniform interior. */ compactedWholeCells: number; /** * `(cell, delineation)` pairs the index stores. */ cellDelineationPairs: number; /** * The mean number of delineations reaching a cell measures how mixed a cell is * before any rating is read and rises as the resolution coarsens. */ meanDelineationsPerCell: number; /** * Delineations whose bounding box forced a coarser resolution than the target. */ coarsenedFeatures: number; /** * The resolutions present in the stored rows, finest last. */ resolutions: number[]; } /** * Accumulates one resolution's cell index over a stream of delineations, * held as short-cell strings because `compactCells` needs full H3 indexes * and round-tripping through the integer form would cost more. */ export declare class SoilCellIndex { #private; readonly resolution: number; constructor(resolution: number); /** * Fold one delineation's classification in. */ add(areaID: string, cells: FeatureCells): void; /** * Compacts the whole-cell set and reports the measurement, applying compaction to the * whole set only because a partial cell's parent would claim fringe ground. */ finish(): SoilCellIndexMeasurement; } /** * The measurement as markdown table rows, one line per element so a caller never * has to split a joined string back apart. */ export declare function formatSoilResolutionRows(measurements: ReadonlyArray): string[]; /** * The cell integer a short-cell string stores as. */ export declare function cellToShortInt(cell: H3Cell): number; //# sourceMappingURL=cells.d.ts.map