/** * Emits Overture's address theme as address records for the address layer's key tables. */ import { type AddressRecord } from "@mailwoman/resolver-wof-sqlite/address/record"; import { type StreetLocale } from "@mailwoman/resolver-wof-sqlite/labels/street/normalize"; import type { PathBuilderLike } from "path-ts"; import type { UnitSplitter } from "#adapters/street/unit"; /** * One Overture address row, limited to the columns the adapter reads. */ export interface OvertureAddressRow { id: string; country: string | null; postcode: string | null; street: string | null; number: string | null; unit: string | null; address_levels: Array<{ value: string | null; }> | null; postal_city: string | null; sources: Array<{ dataset: string | null; record_id: string | null; }> | null; lon: number | null; lat: number | null; } /** * The address record for one Overture row, or `null` when the row lacks a number, * a street, a country or a position. * * The source id is `overture:` of the row's first source, the id today's address-point * builder writes and `packages/corpus/data/us-situs-sources.json` maps to register rows. * The first address level is the region and the second the locality, with the bare form beside it. * * `postal_city` is the postal locality. * A two-letter first level is read as the subdivision code, as Overture writes US states (`WI`). * * A row whose unit is empty and whose street ends in a unit (`FRUITVALE AV U 121`) has * that unit split off, so the street key matches the same building's key in other sources. * * @param streetLocale The locale the street and number keys are folded under. * @param units Splits a trailing unit off the street. * Without it the street is kept as written. */ export declare function overtureAddressRecord(row: OvertureAddressRow, streetLocale: StreetLocale, units?: UnitSplitter): AddressRecord | null; /** * Streams the address records of an Overture address Parquet file or files, * skipping rows the record refuses. * * @param where A DuckDB condition rows must satisfy, such as `address_levels[1].value = 'FL'`, * built with `escapeSQLString`. * @param units Splits a trailing unit off each street, as {@link overtureAddressRecord} describes. */ export declare function readOvertureAddressRecords(parquetPath: PathBuilderLike | readonly PathBuilderLike[], options: { where?: string; streetLocale: StreetLocale; units?: UnitSplitter; }): AsyncGenerator; //# sourceMappingURL=overture.d.ts.map