import { PathBuilder, type PathBuilderLike } from "path-ts"; /** * Points to the Web Soil Survey download cache that serves survey-area archives. */ export declare const WSS_SSA_CACHE_URL = "https://websoilsurvey.sc.egov.usda.gov/DSD/Download/Cache/SSA"; /** * Returns the archive URL for one survey area at one version date, with the brackets * around the date percent-encoded because they're not valid in a URL path. */ export declare function surveyAreaArchiveURL(areaSymbol: string, versionDate: string): string; /** * Configures {@link downloadSurveyArea}, which caches the archive and its * extracted tree under `cacheRoot/`. */ export interface DownloadSurveyAreaOptions { areaSymbol: string; /** * The survey area's version date from `sacatalog.saverest`, formatted as `YYYY-MM-DD`. */ versionDate: string; /** * The cache directory, where each version date gets its own subdirectory so a new * vintage never overwrites an old one and a repeat run downloads no file. */ cacheRoot: PathBuilderLike; onProgress?: (message: string) => void; } /** * What one acquired survey area is, on disk. */ export interface SurveyAreaArchive { areaSymbol: string; versionDate: string; /** * The extracted `/` directory. * It contains `spatial/` and `tabular/`. */ root: PathBuilder; spatialDirectory: PathBuilder; tabularDirectory: PathBuilder; /** * The downloaded ZIP archive, kept so a repeat run skips the transfer and the bytes can be rechecked. */ archivePath: PathBuilder; } /** * Downloads and unzips one survey area into the cache, skipping completed steps. * Returns the paths to its files. * * The download goes through a `.part` file so an interrupted transfer never looks like a complete archive. * * @throws {Error} When the host answers anything but 200, or when the extracted * tree lacks the `spatial` or `tabular` directory. */ export declare function downloadSurveyArea(options: DownloadSurveyAreaOptions): Promise; //# sourceMappingURL=download.d.ts.map