/** * Downloads a region's soil survey areas and turns them into builder inputs. * * The catalogue's `saverest` date picks the archive and the host rejects `HEAD` and ignores `Range`. */ import type { PathBuilderLike } from "path-ts"; import type { SurveyAreaInput } from "#sdk/build-soil"; import type { SoilDataAccessClient, SurveyAreaCatalogEntry } from "#sdk/client"; import { type SurveyAreaArchive } from "#sdk/download"; /** * Options for {@link acquireRegion}. */ export interface AcquireRegionOptions { client: SoilDataAccessClient; /** * The survey-area symbol prefix, where a state code such as `IA` selects a whole state * and a full symbol such as `IA153` selects one area. */ prefix: string; /** * The directory where downloaded archives are cached. */ cacheRoot: PathBuilderLike; /** * The symbols to build from the catalogue's results, defaulting to every symbol. */ only?: ReadonlyArray; onProgress?: (message: string) => void; } /** * The result of acquiring one region. */ export interface AcquiredRegion { catalog: SurveyAreaCatalogEntry[]; archives: SurveyAreaArchive[]; areas: SurveyAreaInput[]; /** * The latest `saverest` date among the areas built, used as the artifact's source vintage. */ sourceVintage: string; } /** * Downloads every survey area that matches the prefix and turns each into a builder input. * * @throws {Error} When the catalogue has no entry for the prefix, when `only` lists a symbol * that the catalogue lacks, or when an area's archive, metadata or shapefile cannot be read. */ export declare function acquireRegion(options: AcquireRegionOptions): Promise; //# sourceMappingURL=acquire.d.ts.map