/** * @copyright Sister Software * @license AGPL-3.0 * @author Teffen Ellis, et al. * * `ads`: Estonia's INSPIRE Addresses (AD) theme, published by Maa- ja Ruumiamet out of the * Aadressiandmete süsteem. * * Input is newline-delimited GeoJSON: one `AD_Address:AD.Address` feature per line, as the service's * `outputFormat=application/json` writes them. A page of the service is a `FeatureCollection`, and the * acquisition step appends each page's `features` to the file, so the adapter streams a 729,973-feature * extract without holding a page in memory. * * GeoServer flattens the INSPIRE application schema here, so every component value arrives inline on * the feature's `properties` and the adapter resolves no reference. The county, the municipality, the * settlement unit, the address area, the thoroughfare and the postal descriptor each occupy one of six * fixed `component_xlink_title` slots, and an unused slot carries the string `unpopulated` rather * than a void object. The slot a value lands in is fixed: read through `JSONSpliterator` over 1,003 * features across ten windows spread through the 729,973, slot 1 is `AU.AdministrativeUnit_maakond` * on all 1,003, slot 2 is `AU.AdministrativeUnit_ov` on all 1,003 and slot 6 is * `AD.Address_PostalDescriptor` on all 1,003, whose title is five digits on all 1,003. Slots 3, 4 and * 5 hold the settlement unit (926), the address area (4) and the thoroughfare (314) or `unpopulated`. * * The field named after the INSPIRE designator holds an internal ADS code, and the house number * sits in the locator's name-spelling element. Estonia writes that ADS code in * `locator_addresslocator_designator_locatordesignator_designator` — `7_1DOW`, `7_3P4Y`, `6_0MU3` — * and 0 of 1,003 sampled values take a house-number shape. The human-readable number is in * `locator_addresslocator_name_locatorname_name_spelling_text`. The designator's own type says * `addressNumber` on the street rows, which is what makes that field tempting to read. Reading it * would stamp `7_1DOW` as the house number on all 729,973 rows. * * Which of the two the locator name is follows the feature's structure rather than the value's shape. * A feature carrying a thoroughfare or an address area writes its number there, and one carrying * neither writes the farm or building name that designates the addressable unit. Over the same 1,003 * features the split is exact: 314 of 314 features with a thoroughfare carry a number-shaped locator * name, 4 of 4 with an address area do, and 685 of 685 with neither carry a name instead. The two * never co-occur. The adapter therefore reads `house_number` where a thoroughfare element exists and * `venue` where none does, so a farm name never arrives labeled as a number. * * Slots 4 and 5 carry a malformed `href`: it addresses the `AU_haldusyksused` workspace with an * `AD_Address` type and answers HTTP 400 `Unknown namespace [AD_Address]`. The adapter reads the slot's * `title` and never follows an `href`. * * A row with no thoroughfare element is the ordinary rural case rather than a defect: 685 of those * 1,003 features, against the whole-service share of 288,009 thoroughfare-bearing rows in 729,973, * which is 39.5%. * * Maa- ja Ruumiamet's dataset record states Creative Commons CC0 1.0 in `otherConstraints`, which the * address-source register elected and records under `spdx` as `CC0-1.0`. CC0 reserves no act, so the * adapter stamps that label on every row and the model card needs no attribution clause, although * crediting the publisher stays good practice. * * The adapter honors `opts.limit` and `opts.signal`. `opts.country` is optional and accepts only `EE`. */ import { type CorpusAdapter } from "#types"; /** * Registry id for this adapter. * * Stamped into every row it emits, so a corpus record can be traced back to the dataset it came from. */ export declare const ADS_ADAPTER_ID = "ads"; /** * The one jurisdiction this adapter emits. * * The service covers Estonia whole, so the set has one member and `opts.country` either * matches `EE` or asks for a jurisdiction the dataset does not publish. */ export declare const ADS_COUNTRIES: readonly string[]; /** * The license the address-source register elected for this publisher. * * `unchecked-access-free-ee-maa-ja-ruumiamet` is elected with `spdx` `CC0-1.0`, * from the `otherConstraints` of CSW record `b0bd266e-b4c6-45db-b7ea-f47486b6258b`. */ export declare const ADS_DEFAULT_LICENSE = "CC0-1.0"; /** * The flattened `AD.Address` properties this adapter consults. * * The explicit shape catches a rename early, and leaving the designator out of * it is deliberate: the property exists on every feature and holds an ADS code * rather than a house number, so the adapter cannot read it by accident. */ interface ADSProperties { gml_id?: number | string; inspireid_identifier_localid?: number | string; locator_addresslocator_name_locatorname_name_spelling_text?: string; component1_xlink_title?: string; component2_xlink_title?: string; component3_xlink_title?: string; component4_xlink_title?: string; component5_xlink_title?: string; component6_xlink_title?: string; } /** * The thoroughfare element a feature addresses, or an empty string where it addresses none. * * A thoroughfare name and an address area never co-occur on one feature, and the * publisher's own `alternativeidentifier` writes either one in the same position: * `Veskimäe tee 8` for the first and `Vahatu vkt 19` for the second. * The address area is therefore read as the street it stands in for rather than as a separate rung. */ export declare function thoroughfareOf(properties: ADSProperties): string; export declare function createADSAdapter(): CorpusAdapter; /** * The configured adapter instance registered with the corpus builder. */ export declare const adsAdapter: CorpusAdapter; export {}; //# sourceMappingURL=adapter.d.ts.map