/** * @copyright Sister Software * @license AGPL-3.0 * @author Teffen Ellis, et al. * * Fetch the US DOT National Address Database (NAD) — ~97 million structured US address-point * records aggregated from state and local authorities. Source for the `usgov-nad` adapter (#30). * US Public Domain (17 U.S.C. § 105). * * - Bounded per-chunk page concurrency (4× speedup at safe pressure) * - 5× larger page size (5 000 vs. the old bash fetcher's 2 000) — fewer round-trips per chunk * - Honest `complete: true` flag: only set when every page in the chunk fetched cleanly * - Built-in fetch with gzip/brotli decompression (no curl + Python subprocess tax) * - Per-chunk manifest with sha256 + record count + error count * * ## Source layout * * The ArcGIS FeatureServer is the only fully-automated path. As of 2026-05: * * - **`bulk`** mode requires a pre-signed S3 URL (Akamai blocks scripted curl on the DOT page). Pass * `--nad-url ` from a browser visit to * [https://www.transportation.gov/gis/national-address-database](https://www.transportation.gov/gis/national-address-database). * - **`featureserver`** mode (default) pages the live FeatureService via OBJECTID ranges, writing * NDJSON chunks into `/usgov-nad/featureserver/`. * * ## Usage * * ```sh * mailwoman corpus fetch nad --out-root $MAILWOMAN_DATA_ROOT/corpus/sources * * # Resume from an OID * mailwoman corpus fetch nad --start-oid 34400001 * * # Increase concurrency on a fast link * mailwoman corpus fetch nad --concurrency 8 --page-size 10000 * ``` */ import type { BaseFetchOptions, FetchSummary } from "./download.ts"; export interface FetchNADOptions extends BaseFetchOptions { /** * Fetch strategy. Default `featureserver`. */ mode?: "featureserver" | "bulk"; /** * Pre-signed S3 URL for bulk mode. */ nadURL?: string; /** * Records per output file. Default `100000`. */ chunkSize?: number; /** * Records per HTTP request. Default `5000`. */ pageSize?: number; /** * Parallel page fetches within a chunk. Default `4`. */ concurrency?: number; /** * Start OBJECTID. Default `1`. */ startOID?: number; /** * Stop before this OID. Default = total count. */ endOID?: number; } export declare function fetchNAD(options: FetchNADOptions, report?: (line: string) => void): Promise; //# sourceMappingURL=nad.d.ts.map