/** * @copyright Sister Software * @license AGPL-3.0 * @author Teffen Ellis, et al. * * Emits corpus rows from Who's On First postalcode GeoJSON repositories. * * The input directory must hold the `whosonfirst-data-postalcode-` repositories and the matching * `whosonfirst-data-admin-` repositories. Postcode records point to their ancestors by `wof:parent_id`, so the * admin records must be in the same walk. * * Each postcode record produces one row per pair of name slot and hierarchy variant. The name slots are the canonical * `wof:name` (slot `default`) plus any `name:*` variants. The hierarchy variants are the postcode by itself, then with * locality, region and country added in turn. Ancestor names always use the canonical `wof:name`. * * `source_id` has the form `wof-postalcode---`. */ import { type WOFVariantSpec } from "#adapters/wof/json-rows"; import { type CorpusAdapter } from "#types"; import { type AncestorNames, type WOFRecord } from "#utils"; /** * Builds the hierarchy variants for a postcode record, or returns an empty list for any other placetype. * * `selfName` is the postcode text for the current name slot. */ export declare function postcodeVariantsFor(row: WOFRecord, ancestry: AncestorNames, selfName: string): WOFVariantSpec[]; /** * Returns a record's name slots. * * The `default` slot holds `wof:name` unchanged. * The other slots hold `name:*` variants that differ from it. */ export declare function nameSlotsFor(rec: WOFRecord): Array<{ key: string; value: string; }>; /** * The source ID on rows from this adapter. */ export declare const WOF_POSTALCODE_ADAPTER_ID = "wof-postalcode"; /** * Creates the WOF postalcode adapter. */ export declare function createWOFPostalcodeAdapter(): CorpusAdapter; /** * The configured adapter instance registered with the corpus builder. */ export declare const wofPostalcodeAdapter: CorpusAdapter; //# sourceMappingURL=adapter.d.ts.map