Burkina Faso home codes
Every compound in Burkina Faso has an N-Ways code. Look one up, find the code at a point, or decode it offline with the open engine, and credit N-Ways where you show it.
What a code is
Every compound in Burkina Faso has an N-Ways code: the short name of its quarter or village and a number of three to five digits, such as Koulouba 1776 or Bobo 26206. Each code is unique in the whole country on its own and leads to the compound’s gate. Codes start provisional and become confirmed when residents agree in the N-Ways app.
- Remembered form, what people say, type and write on plates:
Koulouba 17 76, also without the space (Koulouba 1776); five digits read as a pair and a hundred (Bobo 26 206). Any case and the usual spellings (Tanghin = Tanguin, Ouatinoma = Watinoma), and the official name in place of the short one (Ouaga 2000 25830). A secteur form (Secteur 15 Ouaga) is refused: no secteur map is public. People never see or type a check digit. - Machine form, for systems, QR codes and links:
BF-10000-V064-1776-9(La Poste’s postcode of the commune, the area, the number and a Damm check digit that catches every single wrong digit and every swap of two neighbouring digits;.2/1after it for building 2, gate 1). - Spot code, for any point:
BF-10000 E1885 N1262, a 10 m cell of its commune’s grid; every card also carries its gate’s Plus Code (7C4W9F7M+M89).
On a coded street of Ouagadougou or Bobo-Dioulasso the official street comes first, in officialAddress with "coverage": "official-street"; a door number of the communes’ plan takes its place once it is known. No commune is needed to decode a code; municipality is looked up from the position. The model, the engine and the code areas are open: github.com/n-ways/open-addresses-burkina-faso. The white paper explains every rule.
Credit N-Ways wherever you show a code. Show “Home code by N-Ways Addressing” next to codes in your app, and credit “N-Ways Addressing for Burkina Faso, © N-WAYS LIMITED (nways.ng)” with a link to the repository in your about screen or documentation. The engine is Apache 2.0, the data ODbL 1.0 and the papers CC BY 4.0.
Look up a code
GET https://map.nways.ng/v1/homecodes/{code}, where code is the remembered or machine form, or a spot code on a compound, URL-encoded. No key is needed.
curl "https://map.nways.ng/v1/homecodes/BF-10000-V064-1776-9"{
"country": "BF",
"home": "Koulouba 1776",
"machine": "BF-10000-V064-1776-9",
"check": 9,
"name": "Koulouba",
"coverage": "official-street",
"officialAddress": "Avenue Uemoa, Ouagadougou",
"nameProvisional": false,
"municipality": "Ouagadougou",
"fullLine": "Koulouba 17 76",
"spoken": "Koulouba, 17 76",
"status": "provisional",
"issued": "bulk",
"entrance": { "kind": "centre", "lat": 12.3641615, "lng": -1.5166371, "source": "map" },
"location": { "lat": 12.3641615, "lng": -1.5166371 },
"plusCode": "7C4W9F7M+M89",
"lote": { "class": "hospitality", "coverage": "official-street", "enclosed": false, "floorAreaM2": 1216.9, "kind": "compound", "official": "Avenue Uemoa, Ouagadougou", "rule": "annex", "structures": 3, "use": "mixed" },
"credit": "N-Ways Addressing for Burkina Faso, © N-WAYS LIMITED (nways.ng)",
"creditUrl": "https://github.com/n-ways/open-addresses-burkina-faso"
}| Field | Description |
|---|---|
home, machine | The remembered and machine forms. Show home (or fullLine) to people; store machine. |
fullLine | The code as it is said and painted: Koulouba 17 76. |
check | The check digit of the machine form, for systems; never show it to people. |
officialName | The area’s full name, for small print. Missing when it equals name. |
coverage, officialAddress | On a coded street of Ouagadougou or Bobo-Dioulasso, official-street and the official street within 30 m: show it first, with the code beside it. |
nameProvisional | The commune may still choose the short name. The number never changes; the name may change once, and the old one stays valid. |
municipality | The commune. Context only, from the position: never needed to decode. |
status | provisional, confirmed (residents agreed) or retired (no home there any more; the number is never reused). |
entrance, location, plusCode | Where to go: the gate when it is mapped, else the main building, with its Plus Code. |
lote, structures | The compound and each building’s profile: class, size, floors where known, status, each with its source. Homes never carry anything about the people who live there. |
Errors: 400 homecode_format when the text isn’t a code; 404 homecode_unknown with a message saying why (a name no area has, a number in no block of its name, a secteur form).
What’s the code here?
GET https://map.nways.ng/v1/homecodes/at?lat=…&lng=… answers for a point: "status": "found" with the code, or "none" where no compound has one yet.
curl "https://map.nways.ng/v1/homecodes/at?lat=12.36416&lng=-1.51664"Search
A code typed into N-Ways search, in any of its forms, finds the compound’s gate as the first result, with "category": "homecode" and the credit in attribution.
Decode offline
The repository’s reference engine (Python, standard library only) decodes every form, checks the machine form and reads and writes spot codes, with no network: python3 engine/reference/bf_engine.py resolve Koulouba 17 76. Its conformance vectors (engine/reference/vectors.json) are the test for your own implementation, and engine/data/register.json holds every area and name with its frozen blocks. registry/ holds every issued code, one file per commune, and the registry server in server/ serves it from your own machine.
Host it yourself
You can serve Burkina Faso’s codes from your own servers, with no calls to N-Ways. The repository on GitHub holds every issued code (registry/), the code areas and the model (model/), the reference engine, and a ready-made registry server with its JSON API:
git clone https://github.com/n-ways/open-addresses-burkina-faso
cd open-addresses-burkina-faso/server
docker compose up -dThe server imports the registry on first start, then answers lookups and searches on your machine; server/README.md covers configuration, backups and updates, and docs/api.md every endpoint. Your copy is read-only: new codes come from one issuer per country, N-Ways unless the State designates another, so no number is ever given twice. Pull the repository again for the codes issued since.
| What you take | Licence | What it asks of you |
|---|---|---|
| The engine, the server and the tools | Apache 2.0 | Keep the licence and NOTICE when you ship or change them. |
The codes, the areas and the model (registry/, model/, engine/data/) | ODbL 1.0 | Credit “N-Ways Addressing for Burkina Faso, © N-WAYS LIMITED (nways.ng)”, linked to the repository, where you show the codes. A database you make from the data and share is shared under ODbL 1.0 too. |
The papers and other documents (docs/) | CC BY 4.0 | Credit N-Ways and say what you changed. |
The full terms, and the credit line for maps and datasets made from the data (it also names OpenStreetMap), are in LICENSING.md. You may say your product uses N-Ways Addressing, not that it is N-Ways or is endorsed by N-Ways.