/** * @copyright Sister Software * @license AGPL-3.0 * @author Teffen Ellis, et al. * * `brussels`: the INSPIRE Addresses (AD) theme the Brussels Regional Informatics Center publishes out * of UrbIS. * * Coverage is the Brussels-Capital Region rather than Belgium. Belgium needs three readers, because * each region publishes the theme through its own service: Flanders through a WFS (`vlaanderen`), * Wallonia through an ATOM download service (`wallonie`), and Brussels through the bare HTTP * download below. Every row this adapter emits is `BE`, and any other `opts.country` raises * {@linkcode UnsupportedCountryError}. * * The schema-level reading is `#inspire/address`. This module holds only what is Brussels' own: the * NIS code embedded in every place name, and the empty component reference nine addresses write. * * ## The publication * * `https://urbisdownload.datastore.brussels/INSPIRE/URBIS_ADM_Adresses.zip`, HTTP 200, 11,521,182 * bytes, holding one member `UrbAdm_Adresses.gml` of 474,245,978 bytes. The member is streamed and * never buffered. * * Brussels publishes no INSPIRE ATOM feed for this theme, so there is no `` to poll and the * download is a bare URL. The archive's `last-modified` is `Thu, 01 Dec 2022 07:57:50 GMT`, against * Wallonia's 2025-12-11, so this is the older of the two Belgian regional publications by three * years. * * Two of the publisher's hostnames do not serve it. `urbis.brussels` and `urbisonline.brussels` both * fail TLS with `ERR_TLS_CERT_ALTNAME_INVALID`, because the certificate's altnames are `*.irisnet.be` * and `irisnet.be`. The services live on `irisnet.be`, and the GML's own `base:namespace` states that * host: `http://urbisdownload-v2.gis.irisnet.be/en/temporality#`. * * Counts, read 2026-10-02 with {@linkcode streamMarkupElements} and reconciled against a second * instrument that extracted `gml:featureMember` blocks from the same stream as text: 225,660 * `ad:Address`, 6,238 `ad:ThoroughfareName`, 26 `ad:PostalDescriptor` and 23 `ad:AdminUnitName`. It * publishes no `ad:AddressAreaName`. The two instruments agree and they reconcile: 225,660 addresses * plus 6,287 component features is the 231,947 `gml:featureMember` elements the file holds, and * 231,947 is also the number of void `ad:validFrom` elements, one per member. * * ## The join takes one pass * * Brussels writes all 6,287 component features before the first address, the opposite of Wallonia, so * one pass indexes and joins. Each address writes exactly 7 `ad:component` references — country, * region, province, district, municipality, postal zone and street — all of them local `#` fragments. * Of 1,579,620 reference slots, 1,579,611 name a `gml:id` in the same document and every one of those * resolves. The remaining 9 are empty. * * ## The nine empty references * * Nine addresses write `` in the postal-zone slot, so those nine state * no postcode: `BE.BRUSSELS.BRIC.ADM.ADPT.220623`, `.220631`, `.220635`, `.256972`, `.257005` and * four more, in Bruxelles and Schaerbeek. `componentHrefs` skips an empty href, so an unwary reader * yields those rows with the postcode simply missing. This adapter refuses them and * counts them under {@link Refusals.noPostcode}, because a postcode the publisher left unstated is * not a postcode this repository may read as absent from the address. * * ## The NIS code embedded in every place name * * An `ad:AdminUnitName` spells its name as the NIS code, a space, and the name in parentheses: * `21019 (Woluwe-Saint-Pierre)`, `21004 (Bruxelles)`, `01000 (Belgique)`, * `21000 (Bruxelles-Capitale)`. All 23 take that shape. The code is the publisher's key rather than * part of the name, so {@linkcode placeNameWithoutNISCode} strips it and a row reads * `Woluwe-Saint-Pierre`. A name not of that shape is returned unchanged rather than guessed at. * * The province the file names is `20001 (Brabant flamand)`, and the Brussels-Capital Region sits in no * province. This adapter reads the province nowhere: the locality comes from the unit at * {@link MUNICIPALITY_LEVEL}. * * ## Voids state no reason at all * * Not one nil in this file states a `nilReason`. Over the whole member, 0 void elements give a * reason and these state none: `ad:validFrom` 231,947, `ad:method` 225,660, `ad:specification` * 225,660, `gn:nativeness`, `gn:nameStatus`, `gn:sourceOfName`, `gn:pronunciation` and `gn:script` * 12,574 each, `ad:beginLifespanVersion` 23 and `ad:adminUnit` 23. A reader keyed on `nilReason` * mistakes every one of them for a populated value. `isVoid` in `#inspire/address` therefore keys * on `xsi:nil`, and `voidReason` is read nowhere here. * * ## Coordinates * * This adapter emits text and components only, because {@linkcode CanonicalRow} declares no position * field. The axis order is recorded here for whoever does emit one, because this publisher * contradicts its own declaration. * * Brussels declares `srsName="http://www.opengis.net/def/crs/EPSG/0/3035"`, whose authority order is * northing then easting, and writes easting then northing. `BE.BRUSSELS.BRIC.ADM.ADPT.169731` states * `gml:pos` `3928985.14831507 3095401.17112511`. Read in the declared order that is latitude * 56.877382, longitude −10.402355, in the Atlantic west of Ireland. Swapped it is latitude 50.835742, * longitude 4.429144, in Woluwe-Saint-Pierre, the municipality the same address's own * components name. The file's `gml:boundedBy` lower corner, `3916355.39160602 3088216.44803091`, puts * the easting first in the same way, and Wallonia's, `2942208.441255148 3816649.462808032`, puts the * northing first. So the two Belgian regions declare one CRS and write two axis orders, and a reader * that emits coordinates must decide per publisher rather than per declaration. * * ## Terms, and why no row of this source may ship yet * * **The address-source register holds no row for Brussels.** Its four `BE` sources are * `be-business-legal-1`, `be-business-register-1`, `be-property-building-1` (Flanders) and * `be-property-building-2` (Wallonia). The word Brussels appears in the register only inside * Flanders' and Wallonia's own prose. Both state that Brussels publishes separately. So no license * decision has been elected for this publisher, `electedLicenseLabel` finds no decision to answer * with, and {@linkcode BRUSSELS_DEFAULT_LICENSE} is a label that reads as unreviewed rather than an * SPDX id that would read as elected. * * `createIneligibilityReader` refuses every row whose source no register row declares, so this * adapter's rows cannot enter a release-profile corpus until a row exists, a license is elected for * it, and its `adapterID` is set to `brussels`. Until then the adapter is a reader without a grant. * * The publisher is reported to state CC BY 4.0 in its GeoNetwork record. This file records that as * reported rather than as observed, because the catalogue was not reached from here on 2026-10-02: * `datastore.brussels/geonetwork/srv/...` answered HTTP 404 on both the API and CSW paths and * `geocatalog.brussels` did not resolve. The register elects the terms, and that election needs the * record itself. */ import { type AdapterOptions, 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. * The name is the region, as `vlaanderen`'s and `wallonie`'s are. */ export declare const BRUSSELS_ADAPTER_ID = "brussels"; /** * The stable id of the publication behind every row. * * It belongs in `SourceRegister` beside `be-vlaanderen-inspire-ad`, and this constant * stands in until that entry lands, because a built corpus stores the id on every row * and the id must not change afterwards. * Replace the constant with the `SourceRegister` member on integration. */ export declare const BRUSSELS_SOURCE_REGISTER: "be-brussels-inspire-ad"; /** * The one jurisdiction this adapter emits. * * The download publishes the Brussels-Capital Region, to which ISO 3166-1 assigns * no code of its own, so the set holds one code and a caller naming another gets * {@linkcode UnsupportedCountryError} rather than zero rows. */ export declare const BRUSSELS_COUNTRIES: readonly string[]; /** * The license label recorded on every row. * * The register's source `be-property-building-3` elects `CC-BY-4.0` for Paradigm, read from * the `gmd:useConstraints` of ISO 19139 record `260abd6f-c5b4-4a79-aa80-d6c265002d65`, * which names `URBIS_ADM_Adresses.zip` among its distributions. * That record governs this archive rather than Paradigm's other address product, * the BeSt Brussels register, which is CC0-1.0. * * The value is the SPDX identifier rather than the license's title, because * `licenseVerdict` resolves an identifier and reads a title as unrecognized. * This constant previously held `unreviewed-be-brussels-urbis`, which resolved to no expression, * so these rows carried unknown obligations into a build that had no way to filter them. */ export declare const BRUSSELS_DEFAULT_LICENSE = "CC-BY-4.0"; /** /** * A place name with the publisher's NIS code removed. * * `21019 (Woluwe-Saint-Pierre)` reads `Woluwe-Saint-Pierre`. * A value not of that shape is returned trimmed and otherwise unchanged, because this strips * a prefix the publisher writes rather than parsing a name: a changed shape must reach a * reader as the publisher's own value instead of as a guess at what the name inside might be. * * A value of that shape whose parentheses hold an empty string answers `undefined`, * so the caller refuses the row rather than writing a NIS code into a locality. * * @returns The name, or `undefined` for an absent value and for a code with an empty name. */ export declare function placeNameWithoutNISCode(value: string | undefined): string | undefined; /** * The components an address references, keyed by the `gml:id` its `#` fragment names. */ export interface BrusselsComponentIndex { /** * `ad:ThoroughfareName` → the street name the publisher spells. * * A street writes a French and a Dutch `ad:name`, in that order, and `thoroughfareName` * reads the first: `BE.BRUSSELS.BRIC.ADM.PN.2110` is `Avenue Jules de Trooz` * and `Jules de Troozlaan`, and the row takes the French spelling. */ streets: ReadonlyMap; /** * `ad:PostalDescriptor` → its `ad:postCode`. * * Twenty-six descriptors over nineteen municipalities, so a code may appear twice: * `BE.BRUSSELS.BRIC.ADM.MZ.13` and `.MZ.18` both hold `1050`. */ postcodes: ReadonlyMap; /** * `ad:AdminUnitName` at {@link MUNICIPALITY_LEVEL} → the municipality name, NIS code removed. * * A unit at another level is left out, so the country, region, province * and district references cannot answer for a locality. */ municipalities: ReadonlyMap; } /** * Indexes the three component types in one pass over the member's head. * * The pass runs to the end of the member rather than stopping at the first address, because the * component-before-address order is a measurement of this file rather than a rule of the schema. * * @throws {@linkcode InspireArchiveError} when a component states no `gml:id`, * when two components share one, or when the pass ends with an empty index. */ export declare function readBrusselsComponents(inputPath: AdapterOptions["inputPath"], signal?: AbortSignal): Promise; export declare function createBrusselsAdapter(): CorpusAdapter; /** * The configured adapter instance registered with the corpus builder. */ export declare const brusselsAdapter: CorpusAdapter; //# sourceMappingURL=adapter.d.ts.map