import type { DatabaseClient } from "@mailwoman/sqlite/client"; import type { SoilDatabase } from "#schema"; import type { SoilFeatureSource } from "#sdk/ingest"; /** * What one chunk produced. * * Every field is JSON-serializable, because a chunk normally reports across a process boundary. */ export interface SoilChunkResult { areaSymbol: string; delineations: number; /** * Delineations whose bounding box forced a resolution coarser than the target. */ coarsened: number; /** * `[coverageCell, delineationsReachingIt]` pairs — an array rather than a `Map` * so it survives the process boundary. */ observedByCoverageCell: Array<[number, number]>; /** * The same, counting only delineations whose map unit has soil mapping behind it. * * Separate from the total because the coverage rule depends on this value. * A cell reached only by `notcom` or access-denied polygons lies inside a published * survey area and contains no digitized soil mapping. * * Section 3.2 of the survey specification assigns no row to that cell. */ mappedByCoverageCell: Array<[number, number]>; /** * Square meters computed from the encoded rings, with holes and with every ring treated as exterior. */ area: { nestedM2: number; allExteriorM2: number; }; } export interface IngestSoilChunkOptions { source: SoilFeatureSource; indexResolution: number; coverageResolution: number; /** * The map units with no soil mapping behind them — `notcom`, `notpub`, * access denied, or no readable component weights. * * Passed in rather than joined here so the chunk stays a streaming pass over geometry. */ noMappingMukeys: ReadonlySet; onProgress?: (message: string) => void; } /** * Stream one chunk of one survey area into `database`. * * @throws {Error} On a delineation the classifier refuses — which includes the * allocator's silent zero-cell answer. */ export declare function ingestSoilChunk(database: DatabaseClient, options: IngestSoilChunkOptions): Promise; //# sourceMappingURL=chunk.d.ts.map