import { type UnitSplitter } from "#adapters/street/unit"; import { type CanonicalRow, type CorpusAdapter } from "#types"; /** * Registry id for this adapter, and the source directory its fetcher writes. */ export declare const USGOV_USGS_STRUCTURES_ADAPTER_ID = "usgov-usgs-structures"; /** * License stamped on each row: a US federal work, public domain under 17 U.S.C. ยง 105. */ export declare const USGOV_USGS_STRUCTURES_DEFAULT_LICENSE = "Public Domain"; /** * The file the fetcher writes and the adapter reads, one GeoJSON feature per line. */ export declare const USGS_STRUCTURES_FILENAME = "structures.geojsonl"; /** * The properties of one structure as the fetcher writes them. * * Keys are the service's field names in lower case, plus `layer_id` and `layer`. * A field the service left empty is `null`. */ export interface USGSStructureProperties { /** * The id of the MapServer layer the feature was read from. */ layer_id: number; /** * The layer's slug in `#us/structures/usgs/layers`. */ layer: string; /** * The service's `OBJECTID`, unique across the layers. */ objectid: number; permanent_identifier: string | null; fcode: number | null; gnis_id: string | null; name: string | null; addressbuildingname: string | null; address: string | null; city: string | null; state: string | null; /** * A five-digit ZIP Code or ZIP+4 with its leading zeros, or `null` when the published value isn't one. */ zipcode: string | null; /** * The value the service published, present only when it differs from `zipcode`. */ zipcode_published?: string; /** * The date the publisher loaded the feature, as an ISO 8601 date, or `null` when unstated. */ loaddate: string | null; source_originator: string | null; } /** * One structure as the fetcher writes it. */ export interface USGSStructureFeature { type: "Feature"; geometry: { type: "Point"; coordinates: [longitude: number, latitude: number]; } | null; properties: USGSStructureProperties; } /** * A structure's address as labeled components, or `null` when it lacks a street address, * city, recognized state or ZIP Code. * * `splitUSStreetLine` moves a trailing suite into `unit` when the remainder still reads as a street: * by a street-type word, a number, or the street index scoped to the row's city and ZIP Code. */ export declare function usgsStructureAddress(properties: Pick, units: UnitSplitter): CanonicalRow["components"] | null; /** * Creates the structures adapter. * * A structure in a layer that doesn't train, or with no name or no full address * ({@linkcode usgsStructureAddress}), yields no row, because the row's purpose * is the venue beside a full address. */ export declare function createUSGovUSGSStructuresAdapter(): CorpusAdapter; /** * The configured adapter instance registered with the corpus builder. */ export declare const usgovUSGSStructuresAdapter: CorpusAdapter; //# sourceMappingURL=adapter.d.ts.map