Codes

A code for every compound: the N‑Ways addressing model for Benin

21 October 2026. The text of the paper is the same as in the open repository.

Also in Français

Open on GitHub Download the PDF Get my code

Cadjéhoun 18 07Rue 12.202Cotonou
Rue 12.202 Cotonou’s official street, shown first (a door number of the 2013 plan takes its place once known)

Abstract

Benin has no postcode and, outside parts of Cotonou, no address at the level of the door. Mail is delivered to post-office boxes, Cotonou’s street-coding plan of 2013 remains incompletely signed, and the national addressing strategy authorised in April 2026 has not yet published a format. We present an addressing model that gives every compound in the country a code of the form place name + number, for example Cadjéhoun · 18 07, in which the name is that of the quartier or village residents already use and the number has four or five digits. All areas sharing a name draw their numbers from a single national range for that name, divided into frozen blocks of twice the area’s compounds with a reserve for future areas, so that name and number alone identify one compound in the whole country. Numbers follow a Hilbert curve, so that neighbours receive neighbouring numbers; a Damm check digit over the name’s national index and the number protects exchange between systems without ever appearing on a plate; and any point can be expressed as a 3 m spot code on the UTM zone 31N grid used by the national cadastre. Built from 5,174,482 building footprints grouped into 4,147,741 compounds in 12,964 areas, the register was issued in full on 20 October 2026. We set out the arithmetic of the model, its implementation as an open reference engine, registry and server, and its measured properties: no duplicate code, every written form of a systematic sample decoding to its machine form, a median written length of 16 characters, and every single-digit and adjacent-transposition error in the machine form detected. We close with estimates, with stated assumptions and sensitivity ranges, of its effects for citizens, logistics, emergency services and government.

Keywords: addressing; geocoding; postcodes; Hilbert curve; check digits; building footprints; open data; Benin

1 Introduction

1.1 The problem

An address serves three purposes. It lets a person say where they live in a form that someone else can act on; it gives an institution a stable reference to a place; and it brings a visitor, a courier or an ambulance crew to the right gate. In Benin no national system serves these purposes. The Universal Postal Union’s addressing sheet for the country has no postcode field: a postal address is a name, a post-office box, a locality and a telephone number [1]. Cotonou has coded its streets by arrondissement since 2013 and painted metric door numbers on part of its frontage [2], [3], but the plates are incomplete and the data are not public. The Council of Ministers authorised a national strategy for street and door addressing on 22 April 2026 [4], and at the time of writing no format, operator or timetable has been published. Elsewhere a home is found through its quartier, a landmark and a telephone call.

Benin had 10,008,749 inhabitants at the 2013 census [5]. The population is concentrated in the south, in the Grand-Nokoué conurbation (Cotonou 679,012; Abomey-Calavi 656,358; Porto-Novo 264,320 in 2013), with Parakou (255,478) the principal city of the north. Law 2013-05 divides the territory into 12 départements, 77 communes, 546 arrondissements and 5,290 villages and quartiers de ville [6]. The settlement forms that an addressing model must cover are unusually varied: walled urban concessions in which several households share one gate, rooms let individually off a common yard, the stilt houses of the lake villages of Sô-Ava reached by pirogue [7], the fortified earth houses (tata somba) of the Atacora, and dispersed hut compounds in the fields of the north.

1.2 Contribution

This paper describes an addressing model built for Benin and the register issued with it. Our contributions are:

  1. a code that people can say and remember, made of a place name already in use and a short number, yet unique in the whole country on its own, with no commune, arrondissement or telephone position added (Sections 4.2 to 4.7);
  2. a numbering that is local (neighbours receive neighbouring numbers), extensible (new homes and new areas never renumber existing ones) and checkable in machine exchange (every single-digit error and every transposition of adjacent digits is detected, including errors that would land in another area of the same name) (Sections 4.8 to 4.11);
  3. a metric spot code for any point, laid on the projection of the national cadastre (Section 4.12), and a rule that the State’s own address is always shown first where one exists (Section 4.13);
  4. an open implementation: a specification, a reference engine, the full register of 4,147,741 codes, and a server that any public body can deploy to answer exactly as the issuer does (Section 5);
  5. a measured evaluation of the issued register (Section 6), a record of the designs we rejected and why (Section 7), and sourced estimates of the effects for citizens, logistics, emergency services and government (Sections 8 to 11).

1.3 Structure of the paper

Section 2 reviews the systems that exist in Benin and the international practice. Section 3 describes the data. Section 4 sets out the model, rule by rule, with its formulas and a worked example on a real code. Section 5 describes the implementation and Section 6 evaluates the register. Section 7 records the alternatives considered. Sections 8 to 11 discuss the benefits by sector, Section 12 privacy, safety and governance, and Section 13 the limitations. Section 14 concludes.

3 Data and sources

The model was computed from the following data, listed with their licences in SOURCES.md and LICENSING.md.

  • Building footprints. 5,174,482 footprints: 1,040,021 from OpenStreetMap [18], [19] and 4,134,461 from the Google Open Buildings [20] and Microsoft [21] datasets, taken through the Overture Maps buildings theme [22] where OpenStreetMap has no building. Figure 1 shows the sources by département: OpenStreetMap supplies between 8 % (Couffo) and 34 % (Littoral) of footprints.
  • Places. 13,443 OpenStreetMap place points (quartier, village, hamlet, neighbourhood, suburb, town, city, locality) of the extract of 17 October 2026, which give the code areas their names.
  • Boundaries. The 546 arrondissements of geoBoundaries [23] and the 77 communes of OCHA’s common operational dataset [24].
  • Official streets. The 307 ways of central Cotonou that carry a code of the 2013 plan in OpenStreetMap.
  • Walls, fences and gates. Mapped enclosures and gates from OpenStreetMap, used to group buildings into compounds.
Building footprints by département and source, and the compounds formed from them.

Figure 2 shows the resulting density of compounds by commune, from under 25 per km² in most communes of the north to about 1,300 per km² in Cotonou and 1,400 in Porto-Novo.

Compounds per square kilometre by commune, from the issued register.

4 The model

4.1 Design requirements

We fixed the requirements, in order of priority, before choosing any form:

  1. Memorable and effortless. A resident must be able to say the code from memory after hearing it once, and to obtain it in one step.
  2. Unique on its own. The code must name one compound in the country without a commune, arrondissement or position.
  3. The compound and its gate. The unit is the compound (concession); its buildings are sub-units; navigation ends at the gate.
  4. The State first. Where the State gives an address, it is shown first, exactly as written.
  5. Never mistaken for an official code. The code must not resemble a Cotonou street code, a post-office box or any numeric code the State may issue.
  6. Offline and stable. The code must be decodable without a network, must never move and must never be reused.
  7. Places, never people.

4.2 The forms of a code

Every compound has three forms of one code (Table 1). The remembered form is what people say; the written form is the same text with the separator; the machine form is what systems exchange.

The forms of one code.
Form Example Used by
Remembered Cadjéhoun 18 07, said “Cadjéhoun, dix-huit, zéro sept” residents, callers, drivers
Written Cadjéhoun · 18 07 plates, forms, parcels, messages
Five-digit name Sainte Rita · 12 403, said “douze, quatre cent trois” the areas of the 134 names that need five digits
Machine BJ-COT-12-001-1807-4 applications, QR codes, partners
Sub-units BJ-COT-12-001-1807-4.2 and /2 structure 2 of the compound; entrance 2
Spot COT 12 · 35G 2PX any point: a stall, a field, a landing

Let PP be the plate name of the compound’s area, NN its number, CC the three-letter commune key, AA the two-digit arrondissement number, QQ the three-digit index of the area in its arrondissement, ι\iota the five-digit national index of the plate name and cc the check digit. Then

written=P⋅σ(N),machine=𝙱𝙹-C-A-Q-N-c,c=Damm⁡(ι∥N)\text{written} = P \;\cdot\; \sigma(N), \qquad \text{machine} = \texttt{BJ-}C\texttt{-}A\texttt{-}Q\texttt{-}N\texttt{-}c, \qquad c = \operatorname{Damm}(\iota \,\|\, N) \tag{1} where σ(N)\sigma(N) writes a four-digit number as two pairs (1807↦18071807 \mapsto 18\ 07, as telephone numbers are read in French) and a five-digit number as a pair and a hundred (12403↦1240312403 \mapsto 12\ 403, as French postcodes are read), and ∥\| denotes concatenation of ι\iota and NN, each written on five digits. The separator “·” keeps a name that ends in a digit (“Ganvié 1 · 12 03”) apart from its number; typed input need not carry it. The check digit appears only in the machine form: people never see, say or type it.

4.3 Code areas

The machine form rests on the 546 arrondissements of the 77 communes. A code area is a named place of an arrondissement: an OpenStreetMap place point; an arrondissement with no named place forms one area, index 000. There are 12,964 areas. Each footprint ff takes the nearest place point of its own arrondissement arr⁡(f)\operatorname{arr}(f):

area⁡(f)=arg mina∈arr⁡(f)[(λf−λa)2cos⁡2φf+(φf−φa)2]\operatorname{area}(f) = \operatorname*{arg\,min}_{a \in \operatorname{arr}(f)} \Big[ (\lambda_f - \lambda_a)^2 \cos^2 \varphi_f + (\varphi_f - \varphi_a)^2 \Big] \tag{2} where φ\varphi and λ\lambda are latitude and longitude. The 18,374 footprints that fall in no arrondissement polygon (on the coast, the lagoons and the borders) take the nearest place point in the country. Each area is frozen at issue with its key, its block of numbers and its frame (x0,y0,x1,y1)(x_0, y_0, x_1, y_1): the bounding box of its footprints’ centres widened by 0.0005∘0.0005^\circ (about 55 m) on every side. 12,845 areas hold compounds; the largest, Ladji Farani in Parakou, holds 23,009. Figure 3 shows the distribution: the median area holds 110 compounds.

Code areas by number of compounds, by the digit count of their name. Areas above 4,250 compounds have a block over 8,500 numbers and take five digits.

4.4 Compounds

Footprints are grouped into compounds before any number is given, one area at a time and in a fixed order of stable identifiers (Table 2). The distance between two footprints aa and bb is the shortest distance between their outlines,

d(a,b)=minp∈∂a,q∈∂b‖p−q‖,d(a,b)=0 if a∩b≠⌀.d(a,b) = \min_{p \in \partial a,\; q \in \partial b} \lVert p - q \rVert, \qquad d(a,b) = 0 \text{ if } a \cap b \neq \varnothing. \tag{3}(1)

The grouping rules, applied in order.
Rule Condition Effect
Enclosure the footprint’s centre lies inside a mapped closed wall, fence or hedge of 30 to 6,000 m² the enclosure is one compound
Annex a footprint under 30 m² (kitchen, shower, guard’s room) joins the nearest footprint of at least 30 m² with d≤6d \le 6 m
Hut cluster in the rural communes of Alibori, Atacora, Borgou and Collines (not Parakou): huts under 40 m² that belong to no house, with d≤3d \le 3 m one compound of at most 25 huts
Single any other footprint its own compound

Only annexes join a house and a hut cluster never joins two houses, so groups cannot chain across a neighbourhood. The rules produced 4,147,741 compounds from 5,174,482 footprints (1.25 footprints per compound): 3,329,544 single buildings, 739,537 houses with their annexes, 76,949 hut clusters and 1,711 mapped enclosures. The rules deliberately err towards keeping buildings apart. Merging two codes later costs nothing (the older survives, the other becomes an alias), while splitting a wrong merge would give a household a new code. Section 6.6 measures the consequence.

4.5 Plate names

The name in a code is said on the telephone and painted on a gate, so each area carries a plate name of at most 12 characters and 2 words, in addition to its official name. With NFC(s)\mathrm{NFC}(s) the Unicode normal form of ss, counted in characters, and LL the set of linking words,

plate_ok⁡(s)⇔|NFC(s)|≤12∧|words⁡(s)\L|≤2,\operatorname{plate\_ok}(s) \iff \lvert \mathrm{NFC}(s) \rvert \le 12 \;\wedge\; \lvert \operatorname{words}(s) \setminus L \rvert \le 2, \tag{4} where LL = {de, du, des, d’, la, le, les, l’, et, sur, en, au, aux, à, es}; “es” is the Arabic article of names such as Dar Es Salam. Words are separated by spaces or hyphens.

A name over the limit passes through fixed steps, the first that succeeds being kept: cleaning (text in brackets or after a slash, and the generic words Quartier, Cité, Lotissement, Zone, Village and Campement are removed, so “Camp Peulh Soukoumpérou” becomes Soukoumpérou); “Saint” abbreviated to “St”; and the most distinctive run of whole words, taken only when clearly ahead of the next candidate and preferring the end of the name. A word is never cut; a binding word (Saint, Aladji, El Hadj, Orou, Bio, Sabi) never loses the word after it; a qualifier that distinguishes two places (Peulh, Bariba, Gando, Centre, Gare, an ordinal) is never dropped automatically; and a plate name may not equal a commune seat, a département or a large town unless it is the area’s own. Table 3 gives the outcome.

How the plate names of the 12,964 areas were set.
Outcome Areas
Plate name equal to the official name 11,134
Shortened by cleaning 70
Shortened by abbreviation 1
Shortened to its most distinctive words 460
Left to the commune, with up to three candidates 1,300
of which still over the limit (mostly single words of more than 12 letters) 681

The 1,300 areas left to their commune were issued under their first candidate, so no home waits for a naming decision: 391,974 codes carry a provisional name that the commune may change once. The official name remains an alias of the plate name (1,109 aliases), so typing the full name finds the same compound.

4.6 The name key

Two plate names are the same name when they reduce to the same key,

κ(s)=fold⁡∘join⁡∘ordinal⁡∘article⁡∘split⁡∘lower⁡∘unaccent⁡∘gbe⁡(s),\kappa(s) = \operatorname{fold} \circ \operatorname{join} \circ \operatorname{ordinal} \circ \operatorname{article} \circ \operatorname{split} \circ \operatorname{lower} \circ \operatorname{unaccent} \circ \operatorname{gbe}(s), \tag{5} whose steps are listed in Table 4. Folding follows the spellings by which one Gbe or Yoruba sound is written in French orthography, so it can merge two spellings of one name but never split a name in two.

The steps of the name key, Eq. (5).
Step Rule Example
gbe ɔ → o, ɛ → e, ɖ → d, ŋ → ng, ƒ → f, ʋ → v, ɣ → g Ɖokpa → Dokpa
unaccent, lower, split accents and case removed; split on anything but a–z and 0–9 Gbèdji → gbedji
article, ordinal a leading le, la, les, l’ dropped; a final Roman numeral or ordinal becomes its number Ganvié I = Ganvié 1er → ganvie1
join, fold words joined; tch → c, dj → j, ph → f, ou before a vowel → w, doubled letters single Ouèssè → wese; Tchetti → ceti

The 12,964 areas carry 10,841 distinct plate names. 1,265 names are shared, by 3,388 areas (26.1 %) holding 1,140,780 compounds; the most repeated are Zongo (26 areas), Kpodji (20), Kpota (19), Gbèdji (15) and Fifadji (11).

4.7 National ranges and blocks

Every name owns one national range: [1000,9999][1000, 9999] for a four-digit name, [10000,99999][10000, 99999] for a five-digit one. Let a name be carried by areas 1,…,k1, \dots, k, in the frozen order of their keys (commune, arrondissement, area), holding n1,…,nkn_1, \dots, n_k compounds at issue. Each area receives a block of

B(n)=max⁡(200,100⌈2n100⌉)B(n) = \max\!\Big(200,\; 100 \left\lceil \frac{2n}{100} \right\rceil\Big) \tag{6} numbers: twice its compounds, in whole hundreds, at least 200. With T=∑iB(ni)T = \sum_i B(n_i) the name’s total, its digit count is

δ={4if T+500≤9000,5if T+5000≤90000,\delta = \begin{cases} 4 & \text{if } T + 500 \le 9\,000, \\ 5 & \text{if } T + 5\,000 \le 90\,000, \end{cases} \tag{7} and its blocks are laid from the bottom of the range, F1=10δ−1F_1 = 10^{\delta-1} and Fi+1=Fi+B(ni)F_{i+1} = F_i + B(n_i), leaving the top of the range as spare room for future areas of the name: at least 500 numbers for a four-digit name and 5,000 for a five-digit one. A name exceeding both conditions would take a qualifier; no name in Benin needs one. The largest range, Ladji Farani’s, uses 46,100 of its 90,000 numbers, and the largest shared range, Gouré Tépel’s (two areas), 38,800.

Worked example: Cadjéhoun. One area of Cotonou’s 12th arrondissement with 2,046 compounds. By Eq. (6), B(2046)=100⌈40.92⌉=4100B(2046) = 100 \lceil 40.92 \rceil = 4100, so the block is 1000–5099. By Eq. (7), T+500=4600≤9000T + 500 = 4600 \le 9000: the name has four digits, and 5100–9999 is spare.

Worked example: Agata. Three areas, in Allada (19 compounds), Cotonou (623) and Dangbo (217), with blocks 1000–1199, 1200–2499 and 2500–2999. T=2000T = 2000, so the name has four digits: Agata · 15 00 is in Cotonou, Agata · 26 00 in Dangbo, and “Agata · 45 00” lies in no block and is refused, never guessed.

Worked example: Zongo. The most repeated name: 26 areas whose blocks total 19,900 numbers. Since 19900+500>900019\,900 + 500 > 9\,000, the name has five digits, with blocks 10000–29899 and 70,100 numbers spare (Figure 4).

The 26 blocks of the name Zongo in its national range, each with its numbered part and tail reserve, and the spare space of the name.

Of the 10,841 names, 10,707 have four digits and 134 have five; 12,665 areas have four digits and 299 five. By compound, 3,241,198 codes (78.1 %) have four digits and 906,543 (21.9 %) five. Five-digit areas are mostly towns that OpenStreetMap names with a single point (Ladji Farani, Lokossa, Tanguiéta, Malanville, Porto-Novo) and the most repeated names. Blocks never move, shrink or get renumbered; a new area with an existing name, or an area whose block is full, takes the next block above every block of its name.

4.8 Numbering within an area

Compounds are numbered along a Hilbert curve [25] of order 16 laid over the area’s frozen frame, so that compounds close on the ground receive close numbers [26]. The reference point of a compound is its gate once confirmed, otherwise the centre of its largest building. The point (λ,φ)(\lambda, \varphi) is first mapped to the integer grid

gx=⌊λ−x0x1−x0(216−1)⌋,gy=⌊φ−y0y1−y0(216−1)⌋,g_x = \left\lfloor \frac{\lambda - x_0}{x_1 - x_0}\,(2^{16}-1) \right\rfloor, \qquad g_y = \left\lfloor \frac{\varphi - y_0}{y_1 - y_0}\,(2^{16}-1) \right\rfloor, \tag{8} and its distance hh along the curve is accumulated over the bits of the grid, for s=215,214,…,1s = 2^{15}, 2^{14}, \dots, 1:

rx=⌊gxs⌋mod⁡2,ry=⌊gys⌋mod⁡2,h←h+s2((3rx)⊕ry),r_x = \Big\lfloor \frac{g_x}{s} \Big\rfloor \bmod 2, \quad r_y = \Big\lfloor \frac{g_y}{s} \Big\rfloor \bmod 2, \quad h \leftarrow h + s^2\,\big((3 r_x) \oplus r_y\big), \tag{9} after which, if ry=0r_y = 0, the quadrant is rotated: if rx=1r_x = 1 then (gx,gy)←(216−1−gx,216−1−gy)(g_x, g_y) \leftarrow (2^{16}-1-g_x,\; 2^{16}-1-g_y), and then gxg_x and gyg_y are exchanged. Here ⊕\oplus is bitwise exclusive or. Figure 5 shows the order-3 curve. The nn compounds of an area with block [F,F+B)[F, F+B), sorted by (h,stable id)(h, \text{stable id}) and indexed i=0,…,n−1i = 0, \dots, n-1, receive

Ni=F+i⋅Δ,Δ=max⁡(1,⌊Mn⌋),M=⌊2B3⌋,N_i = F + i \cdot \Delta, \qquad \Delta = \max\!\Big(1, \Big\lfloor \frac{M}{n} \Big\rfloor\Big), \qquad M = \Big\lfloor \frac{2B}{3} \Big\rfloor, \tag{10} so that the first two thirds of the block are spread over today’s compounds and the top third, [F+M,F+B)[F + M, F + B), is a tail reserve kept free at issue.

The order-3 Hilbert curve over an 8 × 8 grid: the number in each cell is its distance along the curve. The registry uses order 16.

Worked example: Cadjéhoun 18 07. The compound’s reference point is φ=6.3582212\varphi = 6.3582212, λ=2.3911161\lambda = 2.3911161, and Cadjéhoun’s frame is (2.389926,6.354647,2.405961,6.367091)(2.389926, 6.354647, 2.405961, 6.367091). By Eq. (8), gx=⌊0.0011901/0.016035×65535⌋=4863g_x = \lfloor 0.0011901/0.016035 \times 65535 \rfloor = 4863 and gy=⌊0.0035742/0.012444×65535⌋=18823g_y = \lfloor 0.0035742/0.012444 \times 65535 \rfloor = 18823; Eq. (9) gives h=969741632h = 969\,741\,632, the 808th of 2,046 compounds along the curve (i=807i = 807). With B=4100B = 4100, M=⌊8200/3⌋=2733M = \lfloor 8200/3 \rfloor = 2733 and Δ=max⁡(1,⌊2733/2046⌋)=1\Delta = \max(1, \lfloor 2733/2046 \rfloor) = 1, Eq. (10) gives N=1000+807=1807N = 1000 + 807 = 1807; the tail reserve is 3733–5099. Figure 6 shows every compound of Cadjéhoun coloured by its number.

The 2,046 compounds of Cadjéhoun (Cotonou, 12th arrondissement), coloured by their number. Numbers run continuously across the area along the Hilbert curve; the circle marks Cadjéhoun 18 07.

4.9 New compounds

A new compound takes the area of the nearest issued code within 250 m, so that it joins its neighbours; failing that, the area containing the point; failing that, the nearest area. Within the area, let aa be the number of its predecessor on the curve (at or before its position hh) and bb that of its successor. It receives

N*=arg minv∈(a,b)\U,v<F+M(|v−a+b2|,v),N^{*} = \operatorname*{arg\,min}_{v \in (a, b) \setminus U,\; v < F + M} \Big( \Big\lvert v - \frac{a+b}{2} \Big\rvert,\; v \Big), \tag{11} where UU is the set of numbers already used or retired; if no such vv exists it takes the lowest free number of the tail reserve, and a full block takes an extension block of its name. In Cadjéhoun Δ=1\Delta = 1, so a house built between two numbered neighbours receives Cadjéhoun · 37 33, the first number of the tail reserve; where the step is larger, new houses take numbers between their neighbours.

4.10 Decoding

Decoding needs neither a commune nor a position:

decode⁡(P,N)={a:κ(P)∈{κ(a)}∪aliases⁡(a),|N|=δ(κ(P)),N∈blocks⁡(a)}.\operatorname{decode}(P, N) = \big\{\, a \;:\; \kappa(P) \in \{\kappa(a)\} \cup \operatorname{aliases}(a),\;\; \lvert N \rvert = \delta(\kappa(P)),\;\; N \in \operatorname{blocks}(a) \,\big\}. \tag{12}(4)

Because the blocks of a name are disjoint, the set has at most one element. Text is read as a name and a number of four or five digits, with or without the separator, in pairs or not. A number in no block, in a name’s spare space or with the wrong digit count is reported as not issued and never guessed. A commune written after a comma must be the area’s, or the code is refused: “Agata · 15 00, Cotonou” is accepted and “Agata · 15 00, Dangbo” refused.

4.11 The check digit

The machine form carries a check digit computed with Damm’s algorithm [27] over the ten digits d1…d10d_1 \dots d_{10} of ι∥N\iota \,\|\, N:

c0=0,ck=T[ck−1][dk](k=1,…,10),c=c10,c_0 = 0, \qquad c_k = T[c_{k-1}][d_k] \quad (k = 1, \dots, 10), \qquad c = c_{10}, \tag{13} where TT is the operation table of a totally anti-symmetric quasigroup of order 10 (Table 5). Such a check detects every single-digit error and every transposition of two adjacent digits.

Damm’s quasigroup table TT (row: interim digit ck−1c_{k-1}; column: next digit dkd_k).
TT 0 1 2 3 4 5 6 7 8 9
0 0 3 1 7 5 9 8 6 4 2
1 7 0 9 2 1 5 4 8 6 3
2 4 2 0 6 8 7 1 3 5 9
3 1 7 5 0 9 8 3 4 2 6
4 6 1 2 3 0 4 5 9 7 8
5 3 6 7 4 2 0 9 5 8 1
6 5 8 6 9 7 2 0 1 3 4
7 8 9 4 5 3 6 2 0 1 7
8 9 4 3 8 6 1 7 2 0 5
9 2 5 8 1 4 3 6 7 9 0

Worked example. Cadjéhoun’s national index is ι=2362\iota = 2362, so the input is 02362 ‖ 01807. The interim digits are 0, 1, 2, 1, 9, 2, 2, 5, 3, 4, so c=4c = 4 and the machine form is BJ-COT-12-001-1807-4. Transposing the last two digits (1870) gives check 3, and changing the last digit (1808) gives check 2; both are refused.

The area digits CC, AA, QQ are deliberately not in the check. Name and number already fix the area through the frozen blocks, so a validator rejects an altered area part because the number belongs to one block only. Putting the area digits into the sum would have two inputs change at once when a mistyped number lands in another area of the same name, and Damm’s guarantee would no longer hold; over ι∥N\iota \,\|\, N it holds for every number of the name.

4.12 Spot codes

All of Benin lies in UTM zone 31N, the projection of the national cadastre, so spot codes are laid on a metric grid of 3 m cells, square everywhere from Cotonou (6.4° N) to Karimama (12.4° N). A point is projected with Krüger’s series to third order in nn [28], [29], accurate to the millimetre within the country. Each arrondissement has a frame whose south-west corner (e0,n0)(e_0, n_0) is its outline’s corner rounded down to 1,000 m, with kxk_x and kyk_y base-20 characters per axis (three cover 24 km, four cover 480 km), over the alphabet 23456789CFGHJMPQRVWX, which has no vowels and no characters easily confused with 0, 1 or each other. With (e,n)(e, n) the projected point,

ix=⌊e−e03⌋,iy=⌊n−n03⌋,i_x = \Big\lfloor \frac{e - e_0}{3} \Big\rfloor, \qquad i_y = \Big\lfloor \frac{n - n_0}{3} \Big\rfloor, \tag{14} and the code is CAC\,A followed by the base-20 digits of iyi_y and ixi_x, interleaved from the most significant, northing first, so that nearby points share their leading characters. 406 arrondissements need six characters, 58 seven and 82 eight. The decoded point is the centre of the cell, at most 1.52≈2.121.5\sqrt{2} \approx 2.12 m from any point inside it.

Worked example. Cadjéhoun 18 07’s point lies in the frame of Cotonou’s 12th arrondissement (e0=429000e_0 = 429\,000, n0=701000n_0 = 701\,000, kx=ky=3k_x = k_y = 3). It projects to e=432659.214e = 432\,659.214, n=702843.008n = 702\,843.008. By Eq. (14), ix=⌊3659.214/3⌋=1219=3⋅400+0⋅20+19i_x = \lfloor 3659.214/3 \rfloor = 1219 = 3 \cdot 400 + 0 \cdot 20 + 19 and iy=⌊1843.008/3⌋=614=1⋅400+10⋅20+14i_y = \lfloor 1843.008/3 \rfloor = 614 = 1 \cdot 400 + 10 \cdot 20 + 14, whose characters are 5 2 X and 3 G P. Interleaved, northing first, they give COT 12 · 35G 2PX (Figure 7). The decoded centre is 0.87 m from the point.

The levels of the spot code COT 12 · 35G 2PX: a 1,200 m cell is divided into 20 × 20 cells of 60 m, each divided into 20 × 20 cells of 3 m.

Points in no outline. The arrondissement outlines come from a generalised boundary dataset, so 13,999 issued compounds (0.34 %), mostly along the northern borders of Ségbana, Malanville and Karimama, lie in no outline. Such a point takes its arrondissement among those whose outline lies within 10 km: the one with the nearest outline whose frame holds the point, distances being measured to the nearest edge with longitude differences scaled by cos⁡φ\cos\varphi, and ties going to the lower commune key, then number. Frames are never moved or widened, because either would change spot codes already published, so a point that no such frame holds takes the nearest cell of a frame at most 999 m away. This applies to 158 compounds on the border with Togo, whose spot code names the frame’s edge cell, at most 392 m from the reference point. The decoder is unchanged, since a spot code names its arrondissement. For example, a compound of Monsey, Karimama, at φ=12.2796011\varphi = 12.2796011, λ=2.9817464\lambda = 2.9817464, 1.4 km beyond the outline, falls in Monsey’s frame and receives KAR 05 · 349 RVMVH.

4.13 Official addresses first

Where the State gives an address, the model shows it first, exactly as written, and the N-Ways code beside it. In Cotonou, the coded street of the 2013 plan within 30 m of a compound is shown first (“Rue 12.202, Cotonou”); 17,948 compounds show one at issue. A door number of the plan, once known for a gate (from the Commune’s data under a data-sharing agreement, or read from the plate by two residents independently), replaces the street. When the national programme delivers addresses, they will be attached to their compounds in the same way. No N-Ways code changes as a result: the code remains the means of reaching the compounds an official address does not yet cover, and of distinguishing the households of a concession that share one gate.

4.14 The building profile

Every structure carries a use class, its confidence and source, its size, its floors where known, and a status. Classes are inferred in a fixed order of evidence: the OpenStreetMap building type (confidence 0.85), a shop, amenity or office tag on the footprint (0.75), a mapped place inside it (0.65), the footprint’s size (0.3–0.4), and otherwise residential by default (0.45). Of the 5,174,482 structures, 5,152,555 are classed residential, nearly all by default; 6,651 are annexes, 6,413 commercial, 2,960 schools, 1,182 under construction, 1,055 health facilities, 1,054 offices and 1,010 places of worship. OpenStreetMap gives floors for 3,968 buildings. The heights in the machine-learned footprint datasets take only 36 distinct values between 3.5 and 7 m and are not used. A residential compound never carries a name.

5 Implementation

5.1 Specification and reference engine

The model is specified normatively in engine/SPEC.md, using the requirement keywords of RFC 2119 [30]. The reference engine, engine/reference/bj_engine.py, implements every rule of Section 4 in the Python standard library: parsing and validation of the three forms, the name key, the national name table, the check digit, spot codes and their projection, the compound grouping and the numbering. Its 38 tests cover each rule and the worked examples of this paper. What an offline decoder needs is about 1.1 MB for the name table with its aliases (0.2 MB compressed) and 0.5 MB of arrondissement outlines; to show compound codes, an application needs the registry slice of its commune (Cotonou’s is about 2 MB compressed).

5.2 The registry

The register is published in full in registry/: one compressed CSV file per commune with one row per code (machine, remembered and written forms, area, official name, number, check digit, status, entrance point and kind, spot code, official address where one exists, building class and use, structures, floor area and grouping rule), the frozen area table areas.csv.gz (12,964 areas with their blocks, names, frame and place point), and MANIFEST.json, which gives the row count and the SHA-256 digest of every file. The registry holds every issued code: 4,147,741 rows in 77 commune files. All codes are provisional at issue and become confirmed when residents agree in the application; none has been retired.

5.3 The server and its interface

The repository includes a ready-made server, server/, which any ministry, post office or developer can deploy with one command (docker compose up). It imports the published registry into SQLite, verifying every file against the manifest, and serves a JSON interface under /v1: the full record of a code, search by remembered form (in any spacing, case or accentuation), machine form, official address or spot code, the code at a point and the codes near it, validation of a machine code, spot codes in both directions, and communes and areas with their blocks. The code at a point follows the issuer’s rule: the compound whose entrance lies within 12 m. A server designated as the issuer can also issue codes for new compounds and further doors by the rules of Sections 4.8 and 4.9, and its new blocks are written back on export in the published format. An export of an unchanged import is byte-identical to the published files. The interface is specified in server/openapi.yaml and documented with real requests and responses in docs/api.md. A deployment is read-only unless it is the designated issuer, because two issuers working independently would hand out the same number twice.

5.4 Conformance and issuer parity

Any implementation must reproduce the conformance vectors in engine/reference/vectors.json, computed on the frozen register: 723 name keys, 500 complete code forms, 2,393 decodings, 648 spot codes, 776 points in no arrondissement outline (456 issued compounds among them, the frames’ nearest cells and refusals), 60 projections and the numbering cases. We further verified that the server issues exactly as the N-Ways issuer does: 530 new compounds and doors in ten areas, two of them filled until they took extension blocks, received the same numbers and forms from both, and 400 points gave the same area, nearest area and spot code. A sample of 55 random codes compared field by field with the issuer’s public interface (1,320 fields) showed no difference.

6 Evaluation

All figures in this section are measured on the issued register by tools/paper-evaluation.py and recorded in model/stats/evaluation.json.

6.1 Uniqueness and coverage

No machine form and no remembered form (name key and number) occurs twice among the 4,147,741 codes. Every compound found on the map at issue has a code: coverage is 100 % of mapped compounds, against 0.4 % (17,948 compounds) that can show an official Cotonou street within 30 m. The 119 areas without compounds keep their blocks for future homes.

6.2 Digits and lengths

Of the 4,147,741 codes, 3,241,198 (78.1 %) have four-digit numbers and 906,543 (21.9 %) five. The written form, separator and spaces included, has a median of 16 characters; 95.8 % of written forms have 20 characters or fewer, and the longest whose plate name is within the limit, “Djèvié-Wadon · 10 000”, has 21. The plate name is within 12 characters for 4,046,845 codes (97.6 %); the 100,896 others belong to the 681 areas whose provisional name is still over the limit (Section 4.5) and await their commune’s choice. Longer codes are therefore a property of a small set of names, not of the model.

6.3 Decoding

For a systematic sample of every twentieth row (207,387 codes), the written form decoded alone by Eq. (12), with no commune or position, gave back the machine form in every case, and every machine form passed its check digit. The decoder needs only the name table of model/names.json.

6.4 Transcription errors

People do not see the check digit, so an error in a remembered code is caught only if it lands outside the issued numbers of the name. We applied every single-digit substitution and every transposition of adjacent digits to the number of a systematic sample of codes (Table 6).

Where an error in the number of a remembered code lands, for every hundredth code of the register (41,477 codes).
Error in the number Errors Another issued code of the name Unissued number in a block Outside every block (refused)
Single-digit substitution 1,533,235 67.0 % 11.6 % 21.4 %
Adjacent transposition 106,986 64.0 % 15.6 % 20.4 %

In the machine form the check digit caught all 1,640,221 of these errors, as Damm’s construction guarantees. In the remembered form, about one error in three is refused or reported as not issued, and about two in three name another compound. Of those, 98.2 % lie in the same area, because numbers are dense within a block and ordered along the Hilbert curve; the median distance to the intended compound is 220 m (interquartile range 71–719 m). A remembered code is therefore protected not by a check digit but by read-back: the application and the dispatcher repeat the place, and the map shows the compound and its gate before anyone travels. Section 7.2 discusses the alternative.

6.5 Spot codes

Every code has a spot code. For every twentieth code whose reference point lies in its frame (207,380 codes), the centre of the published spot code lies a median 1.20 m from the compound’s reference point, with a 99th percentile of 1.97 m and a maximum of 2.12 m, the theoretical bound of Section 4.12. The 13,999 codes (0.34 %) whose reference point lies in no arrondissement outline of the boundary dataset (Section 13), mostly along the northern borders of Ségbana, Malanville and Karimama, take the arrondissement of the nearest outline (Section 4.12); 158 of them, on the border with Togo, lie west of every frame, and their spot code names the frame’s edge cell, at most 392 m from the reference point. Their compound codes are unaffected.

6.6 Compound grouping

To test the grouping, we re-ran the rules with the 1,107 mapped walls and fences that enclose two or more buildings hidden from them. Of these enclosures, 90 (8.1 %) came out as one compound holding all their buildings, 79 of them (7.1 %) with no building from outside the wall, and a further 438 (39.6 %) missed only one building. In a Beninese concession the main house, the let rooms and the kitchen are separate buildings, and with no wall mapped the rules keep them apart on purpose (Section 4.4). The grouping is therefore a lower bound on the size of compounds, to be completed by residents (“these buildings are one home”) rather than by looser rules.

6.7 Worked examples

Table 7 gives real codes from the register: the compound nearest each of a set of well-known places.

Codes from the issued register.
Near Written form Machine form Spot code
Rue 12.202, Cotonou Cadjéhoun · 18 07 BJ-COT-12-001-1807-4 COT 12 · 35G 2PX
Dantokpa market, Cotonou Dantokpa · 26 13 BJ-COT-06-008-2613-1 COT 06 · 353 9J2
Zogbo, Cotonou Zogbo · 27 90 BJ-COT-09-004-2790-9 COT 09 · 359 954
Place de l’Étoile Rouge Sainte Rita · 12 403 BJ-COT-08-001-12403-1 COT 08 · 33V MHV
Université d’Abomey-Calavi Zogbadjè · 16 320 BJ-CAL-02-020-16320-2 CAL 02 · 25X 87C
Ganvié, Sô-Ava Ganvié · 14 20 BJ-SOA-04-002-1420-0 SOA 04 · 74R 4X2
Porto-Novo Porto-Novo · 15 685 BJ-PNO-04-004-15685-6 PNO 04 · 35Q 8R6
Ouidah Ouidah · 12 920 BJ-OUI-03-003-12920-0 OUI 03 · 32W MRF
Abomey Azali · 12 52 BJ-ABO-06-008-1252-8 ABO 06 · 48H 89V
Bohicon Ahouamè · 27 02 BJ-BOH-01-001-2702-8 BOH 01 · 424 QHX
Parakou Lémanda · 13 236 BJ-PKO-02-013-13236-4 PKO 02 · 724 8CH
Djougou Timtim-Bongo · 10 96 BJ-DJO-01-037-1096-4 DJO 01 · 396 6FH
Natitingou Natitingou · 13 13 BJ-NAT-03-003-1313-2 NAT 03 · H66 JVQ
Malanville Malanville · 13 768 BJ-MAL-04-005-13768-9 MAL 04 · J7Q 2WG

The same name in three places: agata 1500 lies in the block 1200–2499, the Agata of Cotonou; agata 2600 lies in Dangbo’s block 2500–2999; Allada’s Agata holds 1000–1199. Nothing is chosen from a list and nothing is guessed. A system that receives BJ-COT-12-001-1870-4, with two digits swapped, refuses it, since the check of 1870 is 3.

7 Designs considered

7.1 Alternatives for the form

Before fixing the form we compared five designs against the requirements of Section 4.1, with a capacity rule that the numbers available must be at least twice today’s compounds (Table 8).

Designs compared for the remembered form.
Design Example Arithmetic Verdict
National digits only 4817305 4.15×106×2=8.3×1064.15 \times 10^6 \times 2 = 8.3 \times 10^6 → 7 digits too long, and says nothing about the place
Commune and digits Cotonou 108417 Abomey-Calavi: 378,856 compounds × 2 → 6 digits too long
Arrondissement and digits Godomey 137081 206 arrondissements fit 4 digits, 336 need 5, 4 need 6 variable length; outside the cities the arrondissement is not the name people say
Arrondissement and base-20 characters Godomey 7HQ2X 204=16000020^4 = 160\,000 letters confused on the telephone in French and Fon
Place name and number from one national range per name Cadjéhoun · 18 07 12,665 of 12,964 areas fit 4 digits chosen

Three further variants were rejected. A Plus Code as the code (for example 6FR4995R+7CQ) mixes letters, digits and a sign and cannot be dictated easily in French or Fon. Name and number with the commune to tell repeats apart (for example “Zongo 48 17, Djougou”) fails because one area in four shares its name, so the commune would be needed every day, and a code written without it would be ambiguous. Three digits for small villages would have suited about 10,861 areas of 450 compounds or fewer, but a single length is easier to teach (“toujours deux paires”), fits one plate design and does not change when a village grows. The cost of the chosen design is measured: sharing a national range and keeping large towns whole gives 21.9 % of compounds a fifth digit, and in return no home needs anything but its place and its number.

7.2 Alternatives for the check character

A check that detects every single error and every transposition of adjacent characters needs either an alphabet of eleven symbols with a prime modulus, as in ISBN-10’s “X”, or a quasigroup scheme over ten digits such as Verhoeff’s [31] or Damm’s [27]. We chose Damm’s algorithm because it uses a single table, needs no permutations and keeps the machine form numeric. We also considered placing a check digit in the remembered form. Section 6.4 shows what it would buy: about two thirds of single-digit errors in a remembered code name another compound, typically a few hundred metres away in the same area, and a visible check digit would catch them. It would also lengthen every code people say and paint by one digit, turning two pairs into an odd group of five, and the error it guards against is the one that read-back of the place and the map already expose before a journey begins. We therefore keep the check digit in the machine form, where codes pass between systems without a person to read them back, and rely on read-back for the spoken form. The measurements planned in Section 13 (digit errors when codes are dictated) will show whether this choice should be reconsidered.

7.3 Choices settled by measurement

Several rules of the issued model differ from the first design; each was settled by a measurement.

8 Benefits for citizens

For a family in a concession of Agla, a stilt house of Ganvié or a village of the Borgou, a code changes four ordinary things.

Being found. Today a visitor, a motorcycle-taxi (zémidjan) driver or a delivery rider is guided by telephone, landmark by landmark. With a code, the resident says one short phrase, “Cadjéhoun, dix-huit, zéro sept”, and the application leads to the gate.

Proving where one lives. Banks, mobile-money agents, schools and employers ask for an address that almost nobody can write in a form anyone can check. At issue, 0.4 % of compounds can show an official street within 30 m; 100 % have a code.

Receiving goods and services. Relatives abroad, shops, and water and electricity services can send to a code rather than to a description, and a household can request a connection or a repair at the right gate.

Simplicity. Nothing is asked of the household. Every compound on the map had its code from 20 October 2026, and the application shows it in one step. It is free, requires no document and holds no personal data. It is not a land title.

The benefit is largest for those least served today: villages far from main roads, the lake villages, the hut compounds of the north, tenants of a concession who share one gate, and residents who do not read French well, for whom a place they know and two pairs of digits are easier than a street name.

9 Logistics and commerce

Delivery in Benin relies on the telephone and the motorcycle. The machine form gives a logistics business a stable key for every customer, resolves to the gate (or to the main building until the gate is confirmed), and carries a check digit so that a mistyped machine code is caught at entry. Because the registry and the engine are open, any business can resolve codes in its own systems, offline, at no charge. The port of Cotonou serves a corridor that reaches far inland: importers, transit agents and the traders of Dantokpa can address goods and payments to a compound, and a cotton or cashew cooperative of the Borgou can list its members’ compounds rather than their villages alone. La Poste du Bénin can deliver to a gate rather than to a box.

Estimate. Industry sources put the average cost of a last-mile delivery attempt in Africa at about US$2.70 and report first-attempt success rates as low as 60 % [32]. Let f0f_0 be the share of first attempts that fail, ρ\rho the share of those failures that a precise code removes, and cac_a the cost of an attempt. The saving per 1,000 deliveries is

S=1000⋅f0⋅ρ⋅ca.S = 1000 \cdot f_0 \cdot \rho \cdot c_a. \tag{15}(13)

With ca=US$2.70c_a = \text{US}\$2.70, a central case of f0=0.20f_0 = 0.20 and ρ=0.5\rho = 0.5 gives S=US$270S = \text{US}\$270 per 1,000 deliveries. Over the ranges f0∈[0.10,0.40]f_0 \in [0.10, 0.40] and ρ∈[0.25,0.75]\rho \in [0.25, 0.75], SS lies between US$68 and US$810. Neither f0f_0 nor ρ\rho has been measured in Benin; Section 13 lists the measurements that would fix them.

10 Emergency services

An ambulance, fire crew or police patrol faces the courier’s problem with more at stake. A qualitative study of emergency medical services in Kigali found that locating patients depended on the local knowledge of caller and crew and required several calls [33]. Benin’s emergency numbers are 112 (SAMU), 116 and 117 (police) and 118 (fire service) [34]; we know of no published measurement of their time to locate a caller.

A code helps a dispatcher in four steps. The caller says one phrase (“Agata, quinze, zéro zéro”), and the registry returns one compound, in Cotonou, not the Agata of Dangbo or Allada. The dispatcher reads back the place, its commune and the gate. The crew drives to the gate, and a spot code marks a point that is not a compound, such as a crash on a highway. All of this works offline.

Estimate. Larsen and colleagues modelled survival after witnessed out-of-hospital cardiac arrest in ventricular fibrillation as 67 % less 2.3 percentage points per minute to cardiopulmonary resuscitation, 1.1 per minute to defibrillation and 2.1 per minute to advanced care [35]. Where one crew brings all three, a delay Δt\Delta t in finding the gate shifts all three intervals, and the expected loss in survival is

ΔP=(βCPR+βD+βACLS)Δt=5.5Δtpercentage points,\Delta P = (\beta_{\mathrm{CPR}} + \beta_{\mathrm{D}} + \beta_{\mathrm{ACLS}})\,\Delta t = 5.5\,\Delta t \quad \text{percentage points}, \tag{16} that is 5.5 points for one minute, 11 for two and 27.5 for five, within the range over which the linear model holds. These figures come from a high-income setting and apply to a specific class of arrest; for Benin they indicate an order of magnitude, not a prediction.

11 Government coordination and planning

A code is a shared key. When ministries, communes, utilities and the national statistics institute refer to a compound by the same code, their records can be joined without matching names and descriptions.

One reference for all services. An address directory gives a list of premises more complete than a tax roll and reveals who is missing from it [8]. The national programme can start from a register of 4,147,741 compounds, each with a position and a code, and the register can be mapped to its addresses, or transferred to it, as they are delivered.

A code that outlives reforms. Communes and arrondissements are labels derived from a compound’s position. When a boundary moves, every code keeps working, and the area key in the machine form does not change.

The census. A table of codes against enumeration areas would give the next census a frame of 4,147,741 compounds to sample from and return to, without storing any name.

Access to services. Straight-line distances from a random sample of 20,000 compounds to the nearest mapped facility are given in Table 9. They describe the map as much as the country, since village health posts and police stations are sparsely mapped; a ministry can replace the facility list with its own and recompute them in minutes.

Straight-line distance from 20,000 sampled compounds to the nearest mapped facility.
Facility Within 2 km Within 5 km Median distance
Health facility 48.0 % 70.7 % 2.2 km
School 50.4 % 73.2 % 2.0 km
Police 19.7 % 34.3 % 8.9 km
Pharmacy 24.9 % 39.4 % 7.9 km

Estimate. A conventional door-numbering survey of the same compounds would cost

C=N⋅cd,C = N \cdot c_d, \tag{17} where N=4147741N = 4\,147\,741 is the number of compounds and cdc_d the cost per doorway. At the World Bank’s average of US$5.7 per doorway across 21 African cities [8], table 3.1, C≈US$23.6C \approx \text{US}\$23.6 million; at the per-plot cost of Cotonou’s urban land register (US$11–15 [8], table 3.7), CC lies between US$45.6 and US$62.2 million. Both costs are at the prices of their time and exclude maintenance. The register does not replace signage, which the State may still choose to install, but it removes the survey and numbering step and provides the list of compounds that signage would follow.

12 Privacy, safety and governance

Privacy. Codes describe places, never people. Residential compounds carry no name and no occupant data; businesses and public buildings may show the name they publish. No identity number is collected, and nothing links a code to a personal identifier. The processing of personal data in the application (telephone numbers, gate photographs) falls under Book V of the Code du numérique, supervised by the Autorité de protection des données à caractère personnel (APDP), which requires a prior declaration and an authorisation for transfers abroad and for links between files [36]. A household may ask for its entrance to be hidden from the public map; the code remains valid for a visitor who has it.

Safety. An address is neither a land title nor a list for eviction. Data at the level of a compound beyond the published register (who confirmed what, photographs, household descriptions) are released only on a court order, with a public report of the request.

Governance. A single issuer maintains the register, so that no two compounds share a code. Areas, blocks and frames are frozen, codes never move, and regrouping never changes an issued code: if two compounds prove to be one, the older code survives and the other becomes an alias; if one proves to be two, the part with the gate keeps its code. A commune may rename an area (the old name remains an alias), choose a provisional plate name once, or add areas. Cotonou’s addresses and the national programme’s belong to the State: the model shows them as written, never edits them, and reports any mismatch observed on the ground to their holder. The repository is structured so that it can be transferred to the State or to a body it designates, under its open licences, without forking the engine.

13 Limitations and future work

Future work will measure what the estimates of Sections 9 to 11 assume (Table 10).

Measurements planned to replace the assumptions of the impact estimates.
Measure Method Target
Recall of one’s own code after one week residents asked without the application, in French, Fon and Bariba at least 80 % exact
Digit errors when a code is dictated by telephone recorded calls with partner couriers under 5 %
First-attempt delivery success partner couriers, with and without a code at least 20 points higher
Time from arrival in the quartier to the gate courier application timestamps halved
Gates confirmed; door numbers attached in Cotonou residents and couriers 50,000

14 Conclusion

Benin has no postcode and, outside part of Cotonou, no address at the door. We have shown that an address can be given to every compound in the country in a form that residents already half know: the name of their quartier or village and two pairs of digits. A single national range per name makes the code unique on its own; frozen blocks sized on real compounds, with a tail reserve and spare space, make it stable as the country builds; a Hilbert-ordered numbering makes it local; and a check digit hidden in the machine form makes it safe to exchange. The register of 4,147,741 codes was issued on 20 October 2026 and is published in full with its specification, reference engine and server, so that the State, or any body it designates, can verify every rule, answer exactly as the issuer does, and take over the register.

Data and code availability

The specification, reference engine, register, server, tools and this paper are published at https://github.com/n-ways/open-addresses-benin. Code is licensed under the Apache License 2.0, data under the Open Database License 1.0 and documents under CC BY 4.0. Every use should credit: “N-Ways Addressing for Benin, © N-WAYS LIMITED (nways.ng)”. The data in the figures are produced by tools/paper-figures.py and the evaluation by tools/paper-evaluation.py, from the published files only.

Acknowledgements

The model is built on OpenStreetMap data (© OpenStreetMap contributors, ODbL), the Google Open Buildings dataset (CC BY 4.0), Microsoft’s building footprints (ODbL) distributed through the Overture Maps Foundation, geoBoundaries (ODbL) and the commune boundaries of the UN Office for the Coordination of Humanitarian Affairs (CC BY-IGO). We thank the mappers of Benin whose work on places, buildings and Cotonou’s street codes made it possible.

References

[1]
Universal Postal Union, ‘Benin: Addressing sheet’. Universal Postal Union, Bern, 2025. Accessed: Oct. 21, 2026. [Online]. Available: https://www.upu.int/UPU/media/upu/PostalEntitiesFiles/addressingUnit/benEn.pdf
[2]
C. Hessoun, ‘Plan d’adressage de la ville de Cotonou : La coopération française aide la municipalité à entrer dans la modernité’. La Nouvelle Tribune, Nov. 13, 2013. Accessed: Oct. 21, 2026. [Online]. Available: https://lanouvelletribune.info/2013/11/plan-d-adressage-de-la-ville-de-cotonou-la-cooperation-francaise-aide-la-municipalite-a-entrer-dans-la-modernite/
[3]
OpenStreetMap Wiki contributors, ‘FR:Benin’. OpenStreetMap Wiki. Accessed: Oct. 21, 2026. [Online]. Available: https://wiki.openstreetmap.org/wiki/FR:Benin
[4]
Secrétariat général du Gouvernement, ‘Compte rendu du Conseil des ministres du 22 avril 2026’. République du Bénin, Cotonou, 2026. Accessed: Oct. 21, 2026. [Online]. Available: https://sgg.gouv.bj/cm/2026-04-22/
[5]
T. Brinkhoff, ‘Benin: Administrative division (RGPH4 2013)’. City Population. Accessed: Oct. 21, 2026. [Online]. Available: https://www.citypopulation.de/en/benin/admin/
[6]
République du Bénin, ‘Loi no 2013-05 du 27 mai 2013 portant création, organisation, attributions et fonctionnement des unités administratives locales en République du Bénin’. Secrétariat général du Gouvernement, Cotonou, 2013. Accessed: Oct. 18, 2026. [Online]. Available: https://sgg.gouv.bj/doc/loi-2013-05/download
[7]
Gouvernement de la République du Bénin, ‘Destination Bénin : Sô-Ava, cité pittoresque, au cœur de l’art de la vie sur l’eau’. gouv.bj, Jan. 14, 2021. Accessed: Oct. 21, 2026. [Online]. Available: https://www.gouv.bj/article/1130/destination-benin-cite-pittoresque-coeur-eau/
[8]
C. Farvacque-Vitkovic, L. Godin, H. Leroux, F. Verdet, and R. Chavez, Street addressing and the management of cities. in Directions in Development. Washington, DC: World Bank, 2005. Accessed: Oct. 21, 2026. [Online]. Available: https://documents1.worldbank.org/curated/en/573071468142795481/pdf/329230Street0Addressing01not0external1.pdf
[9]
Soussouni D., ‘Bénin : Le gouvernement veut réorganiser les adresses des rues et habitations’. Bénin Web TV, Apr. 22, 2026. Accessed: Oct. 21, 2026. [Online]. Available: https://beninwebtv.bj/benin-le-gouvernement-veut-reorganiser-les-adresses-des-rues-et-habitations/
[10]
SRTB, ‘Cadre de vie : Vers une stratégie nationale pour l’adressage des voies au Bénin’. Société de radio et de télévision du Bénin, Apr. 22, 2026. Accessed: Oct. 18, 2026. [Online]. Available: https://srtb.bj/cadre-de-vie-vers-une-strategie-nationale-pour-ladressage-des-voies-au-benin/
[11]
République du Bénin, ‘Loi no 2017-15 du 10 août 2017 modifiant et complétant la loi no 2013-01 du 14 août 2013 portant code foncier et domanial en République du Bénin’. Secrétariat général du Gouvernement, Cotonou, 2017. Accessed: Oct. 18, 2026. [Online]. Available: https://sgg.gouv.bj/doc/loi-2017-15/download
[12]
Agence nationale du domaine et du foncier, ‘Cadastre national du Bénin’. ANDF, Cotonou. Accessed: Oct. 18, 2026. [Online]. Available: https://cadastre.bj
[13]
Universal Postal Union, ‘S42: International postal address components and templates’, Universal Postal Union, Bern, UPU standard. Accessed: Oct. 21, 2026. [Online]. Available: https://www.upu.int/UPU/media/upu/documents/PostCode/S42_International-Addressing-Standards.pdf
[14]
International Organization for Standardization, ‘ISO 19160-1:2015. Addressing, Part 1: Conceptual model’, ISO, Geneva, 2015. Accessed: Oct. 21, 2026. [Online]. Available: https://www.iso.org/standard/61710.html
[15]
Universal Postal Union, Addressing the world: An address for everyone. Bern: International Bureau of the Universal Postal Union, 2012. Accessed: Oct. 21, 2026. [Online]. Available: https://www.upu.int/UPU/media/upu/publications/whitePaperAddressingTheWorldEn.pdf
[16]
Google, ‘Open Location Code: A library to generate short codes, called plus codes, that can be used as digital addresses where street addresses do not exist’. GitHub, Apache License 2.0, 2014. Accessed: Oct. 21, 2026. [Online]. Available: https://github.com/google/open-location-code
[17]
Z. K. Gyesi, ‘Digital property address system goes live Wednesday’. Graphic Online, Accra, Oct. 16, 2017. Accessed: Oct. 21, 2026. [Online]. Available: https://www.graphic.com.gh/news/general-news/digital-property-address-system-goes-live-wednesday.html
[18]
P. Neis and D. Zielstra, ‘Recent developments and future trends in volunteered geographic information research: The case of OpenStreetMap’, Future Internet, vol. 6, no. 1, pp. 76–106, 2014, doi: 10.3390/fi6010076.
[19]
OpenStreetMap contributors, ‘OpenStreetMap data extract for Benin’. Geofabrik GmbH, ODbL 1.0, Oct. 17, 2026. Accessed: Oct. 17, 2026. [Online]. Available: https://download.geofabrik.de/africa/benin.html
[20]
W. Sirko et al., ‘Continental-scale building detection from high resolution satellite imagery’. 2021. Accessed: Oct. 21, 2026. [Online]. Available: https://arxiv.org/abs/2107.12283
[21]
Microsoft, ‘Global ML building footprints’. GitHub, ODbL. Accessed: Oct. 21, 2026. [Online]. Available: https://github.com/microsoft/GlobalMLBuildingFootprints
[22]
Overture Maps Foundation, ‘Buildings theme guide’. Overture Maps Foundation. Accessed: Oct. 21, 2026. [Online]. Available: https://docs.overturemaps.org/guides/buildings/
[23]
D. Runfola et al., ‘geoBoundaries: A global database of political administrative boundaries’, PLoS ONE, vol. 15, no. 4, p. e0231866, 2020, doi: 10.1371/journal.pone.0231866.
[24]
UN Office for the Coordination of Humanitarian Affairs, ‘Benin: Subnational administrative boundaries (COD-AB)’. Humanitarian Data Exchange, CC BY-IGO. Accessed: Oct. 18, 2026. [Online]. Available: https://data.humdata.org/dataset/cod-ab-ben
[25]
D. Hilbert, ‘Ueber die stetige Abbildung einer Linie auf ein Flächenstück’, Mathematische Annalen, vol. 38, pp. 459–460, 1891, doi: 10.1007/BF01199431.
[26]
B. Moon, H. V. Jagadish, C. Faloutsos, and J. H. Saltz, ‘Analysis of the clustering properties of the Hilbert space-filling curve’, IEEE Transactions on Knowledge and Data Engineering, vol. 13, no. 1, pp. 124–141, 2001, doi: 10.1109/69.908985.
[27]
H. M. Damm, ‘Total anti-symmetrische Quasigruppen’, PhD thesis, Philipps-Universität Marburg, 2004. doi: 10.17192/z2004.0516.
[28]
L. Krüger, Konforme Abbildung des Erdellipsoids in der Ebene. in Veröffentlichung des Königlich Preußischen Geodätischen Institutes, Neue Folge, no. 52. Potsdam; Leipzig: B. G. Teubner, 1912. doi: 10.2312/GFZ.b103-krueger28.
[29]
C. F. F. Karney, ‘Transverse Mercator with an accuracy of a few nanometers’, Journal of Geodesy, vol. 85, no. 8, pp. 475–485, 2011, doi: 10.1007/s00190-011-0445-3.
[30]
S. Bradner, ‘Key words for use in RFCs to indicate requirement levels’. RFC 2119, Internet Engineering Task Force, 1997. doi: 10.17487/RFC2119.
[31]
J. Verhoeff, Error detecting decimal codes. in Mathematical Centre Tracts, no. 29. Amsterdam: Mathematisch Centrum, 1969.
[32]
S. Odeloye and D. Onajobi, ‘Innovations in last-mile delivery: How automation can revolutionize the industry in Africa’. NextBillion, May 15, 2023. Accessed: Oct. 21, 2026. [Online]. Available: https://nextbillion.net/innovations-last-mile-delivery-automation-revolutionize-industry-africa
[33]
M. Hunt, ‘Challenges locating the scene of emergency: A qualitative study of the EMS system in Rwanda’. RANGE: Undergraduate Research Journal, University of Utah, 2023. Accessed: Oct. 21, 2026. [Online]. Available: https://uen.pressbooks.pub/2023range/chapter/challenges-locating-the-scene-of-emergency-a-qualitative-study-of-the-ems-system-in-rwanda/
[34]
E. Djogbénou, ‘L’ARCEP Bénin publie la liste officielle des numéros courts d’urgence et d’assistance’. Bénin Web TV, Jun. 26, 2026. Accessed: Oct. 21, 2026. [Online]. Available: https://beninwebtv.bj/larcep-benin-publie-la-liste-officielle-des-numeros-courts-durgence-et-dassistance/
[35]
M. P. Larsen, M. S. Eisenberg, R. O. Cummins, and A. P. Hallstrom, ‘Predicting survival from out-of-hospital cardiac arrest: A graphic model’, Annals of Emergency Medicine, vol. 22, no. 11, pp. 1652–1658, 1993, Available: https://pubmed.ncbi.nlm.nih.gov/8214853/
[36]
République du Bénin, ‘Loi no 2017-20 du 20 avril 2018 portant code du numérique en République du Bénin’. Autorité de protection des données à caractère personnel (APDP), Cotonou, 2018. Accessed: Oct. 18, 2026. [Online]. Available: https://apiprod.apdp.bj/storage/c46ab3f55e93d40c8545b70add0ea8c7/CODE-DU-NUMERIQUE-DU-BENIN_2018-version-APDP.pdf