Skip to content

Add support for Moldova #57

@bk86a

Description

@bk86a

Country

Moldova (MD)

Request Type

New country support

Description

Add support for Moldovan postal codes (4-digit, prefix MD- mandatory in Posta Moldovei usage) mapping to a regional classification. Like Albania and Montenegro, Eurostat does not currently publish a TERCET postal-code-to-NUTS file for Moldova. Moldova's national NUTS-style classification is maintained by the National Bureau of Statistics (NBS) under Order No. 4 / 2024 (codes MD1, MD11/MD12, MD111MD115 + MD120), but it is not yet incorporated into Eurostat's NUTS-2024 correspondence tables (per the OpenCage candidate-countries note: "still missing… Moldova (MD), and Ukraine (UA)"). A practical implementation can ingest GeoNames' MD postal codes (1 753 rows covering ~30 raions including Transnistria) via the existing extra_sources mechanism with a static raion-name → MD11x/MD120 lookup table.

See Research analysis below for the format details, NUTS-availability probe, and the open questions before implementation can start.

Example Postal Codes

MD-2001    Chișinău (centre)
MD-2012    Chișinău
MD-2019    Chișinău
MD-3101    Bălți (mun.)
MD-3805    Comrat (Gagauzia)
MD-5201    Anenii Noi
MD-6501    Anenii Noi raion (rural)
MD-3300    Tiraspol (Transnistria, Posta Moldovei system)
MD-7301    Cahul

Posta Moldovei always renders codes as MD-NNNN City (with hyphen). Plain 4-digit form is also accepted but the prefix is the canonical written form.

Data Sources


Research analysis (2026-04-29)

1. Postal code format

  • Format: 4 digits, optional MD- prefix in source data, mandatory in Posta Moldovei output.
  • Adopted: current 4-digit MD-NNNN system in use since the 1990s post-Soviet reorganisation; replaced the legacy 6-digit Soviet 277XXX block.
  • Structure: first digit corresponds to a postal zone broadly aligned with NBS statistical regions:
    • 2xxx — Chișinău municipality (capital)
    • 3xxx — Bălți municipality + north (Edineț, Soroca, Glodeni, Drochia, Râșcani, Briceni, Ocnița, etc.)
    • 4xxx — north-central (Florești, Sângerei, Telenești, Șoldănești, Rezina, Orhei)
    • 5xxx — east / Dniester left bank (Anenii Noi, Criuleni, Dubăsari, Rîbnița, Camenca — Transnistria localities under Posta Moldovei coding)
    • 6xxx — central / east-central (Anenii Noi rural, Bender, Tiraspol, Slobozia, Grigoriopol, Căușeni)
    • 7xxx — south (Cahul, Cantemir, Leova, Ștefan-Vodă, Taraclia, Comrat — Gagauzia)
    • 8xxx / 9xxxnot in active use (reserved).
  • Empirical count: GeoNames MD.zip (26 KB) = 1 753 rows covering ~30 distinct raion names (some duplicated with Tr. suffix indicating Transnistria-administered raions). First-digit distribution: 2×26, 3×385, 4×383, 5×479, 6×294, 7×186.
  • Variations: 2012, MD-2012, MD 2012, MD2012. Soviet-era 277012 is dead.

Suggested regex (project style):

"MD": {
  "regex": "^(?:MD[\\s\\-–—.]*)?([0-9]{4})$",
  "example": "2012, MD-2012, MD 2012, 6501",
  "expected_digits": 4
}

2. Country prefix / addressing convention

  • Posta Moldovei: canonical line is MD-NNNN City; the prefix is part of the official format (unlike AL/ME). UPU's Moldova addressing template confirms MD- placement.
  • Google libaddressinput: returns {"key":"MD","fmt":"%N%n%O%n%A%nMD-%Z %C","zip":"\\d{4}","zipex":"2012,2019","postprefix":"MD-"}postprefix is set to MD-, like FI/HR/LV/SE/SI.
  • GeoNames countryInfo.txt: postalCodeFormat=MD-####, regex ^MD-\d{4}$.
  • Implementation note: the regex must accept both prefixed and bare forms (matching the project's defensive style for AT/BE/DE/HU), but normalised output should re-emit MD-NNNN to align with Posta Moldovei convention.

3. GISCO TERCET availability

Not currently published.

  • Probes of https://gisco-services.ec.europa.eu/tercet/NUTS-2024/pc{2024,2023}_MD_NUTS-2024_v1.0.zip return the SPA fallback (HTTP 200, content-type: text/html, 855 B, last-modified: 2021-01-13) — identical to AL/ME/BA non-existence signal. No real ZIP exists.
  • Reason: Moldova has no NUTS code in Eurostat's NUTS-2024 correspondence tables (per OpenCage blog, May 2024), so no TERCET mapping is possible upstream.

4. NUTS / statistical regions

Moldova has a national NBS classification modelled on NUTS but not (yet) endorsed in Eurostat's NUTS-2024:

Level Code Name
NUTS 1 MD1 Republic of Moldova
NUTS 2 MD11 Right bank of the Dniester
NUTS 2 MD12 Left bank of the Dniester (Transnistria)
NUTS 3 MD111 North Region (Nord)
NUTS 3 MD112 Centre Region (Centru)
NUTS 3 MD113 South Region (Sud)
NUTS 3 MD114 UTA Găgăuzia
NUTS 3 MD115 Municipality of Chișinău
NUTS 3 MD120 Administrative-territorial units on the left side of Nistru river

Sources: Wikipedia — NUTS of Moldova, NBS Moldova classifier (CUATM/CSRM). Eurostat regional yearbook explicitly states: "No regional data are available for Bosnia and Herzegovina, Georgia and the Republic of Moldova; national data are included when available."

LAU level: 32 raions + 3 municipalities (Chișinău, Bălți, Bender) + UTA Găgăuzia + Transnistria localities = ~37 administrative units.

5. Alternative data sources

Source Status
GeoNames MD.zip Best: 1 753 rows, all 6 NBS regions covered, raion name in column 4. CC BY 4.0. Codes pre-formatted as MD-NNNN.
Posta Moldovei lookup UI only, no bulk export / no documented API.
Google libaddressinput Format/regex only, no enumerated list, no sub_keys.
OpenStreetMap Sparse addr:postcode; some raion polygons but no code → polygon mapping.
Commercial (GeoPostcodes) ~1 200 codes, paid licence.
Transnistrian "Pridnestrovian Post" Operates parallel handling but uses Moldovan MD-codes for international interchange; no separate code list.

6. Architecture fit

Identical to Albania (#54): GISCO loader will exhaust Strategy 1 + Strategy 2 silently. Two viable paths:

  • A. GISCO-only (current architecture): add MD to countries, accept zero entries until Eurostat publishes a TERCET MD file. Net result: pattern validation works, lookups return not_found. Aligned with how the project handles missing data.
  • B. Parallel loader via extra_source_urls (recommended): ingest GeoNames MD.zip with a transformer mapping raion name → MD11x / MD120 NUTS3 (one-time ~30-row static table). Reuses cache/DB/overwrite plumbing — no new top-level loader needed. Same pattern proposed for AL.

Option B yields ~1 750 high-quality lookups across all six NBS regions, including the Transnistrian left bank.

7. Open questions

  1. Code system identity: should returned codes use the NBS MD1/MD11x/MD120 scheme (which is NUTS-shaped but not Eurostat-blessed) or a synthetic MD0/MD00/MD000 collapse pending Eurostat ratification? The UK/ITL code_system discriminator added in Implement support for UK postal codes and the ITL (International Territorial Level) #7 is the natural carrier (e.g. code_system: "NBS-MD").
  2. Transnistria treatment: GeoNames raion names carry a Tr. suffix (Tiraspol Tr., Bender Tr., Camenca Tr., Dubasari Tr., etc.) for Posta Moldovei codes that physically deliver into the left bank. Map all such rows to MD120, or split between MD120 (Dniester left bank raions) and MD111-113 (right-bank parts of historically split raions like Anenii Noi / Dubăsari)? GeoNames lat/lon allows polygon-based disambiguation.
  3. Raion-name normalisation: GeoNames uses Romanian without diacritics (Singerei, Hincesti, Calarasi); NBS uses diacritics (Sîngerei, Hîncești, Călărași). Need a normalised lookup table (~30 entries). Some rows have typos (Cantrmir / Canul / Uhnheni) — manual cleanup required.
  4. Coverage threshold: 1 753 rows is rich (more than AL's 494) but is GeoNames-only acceptable, or should we wait for Eurostat to publish TERCET MD? Same governance question as AL.
  5. Confidence tier: GeoNames + manual mapping should likely map to medium rather than high (which is reserved for GISCO-validated codes).
  6. Prefix handling: enforce MD- in canonical output (matching Posta Moldovei) but accept bare 4-digit input — same pattern as the FR/DE prefix handling.

Sources

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions