N-Ways
Developer docsCameroon home codes

Cameroon home codes

Every compound in Cameroon has an N-Ways code. Look one up, find the code at a point, decode it offline with the open engine or host the registry yourself, and credit N-Ways where you show it.

On this page

What a code is

Every compound in Cameroon has an N-Ways code: the short name of its quarter or village and a number of three to five digits, such as Intendance 137 or Bonapriso 1401. 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: Bonapriso 14 01, also without the space (Bonapriso 1401); five digits read as a pair and a hundred (Mokolo 18 834). Any case, with or without accents, and the official name in place of the short one (Carrefour Intendance 137). Names are in French or English, the language of the arrondissement. People never see or type a check digit.
  • Machine form, for systems, QR codes and links: CM-YDE1-011-137-5 (the arrondissement, the area, the number and a Damm check digit that catches every single wrong digit and every swap of two neighbouring digits).
  • Spot code, for any point: CM-DLA1 E0449 N0268, a 10 m cell of its arrondissement’s grid; every card also carries its gate’s Plus Code (6FMHVG89+H53).

On a coded street of Yaoundé or Douala the official street comes first, in officialAddress with "coverage": "official-street"; a door number of the councils’ plan takes its place once it is known, and Campost’s addresses fill a reserved field the day they are published. No arrondissement is needed to decode a code; municipality is looked up from the position. The model, the engine, the registry of every code and a ready-made server are open: github.com/n-ways/open-addresses-cameroon. The research paper explains every rule.

Note:

Credit N-Ways wherever you show a code. Show “Codes by N-Ways Addressing” next to codes in your app, and credit “N-Ways Addressing for Cameroon, © 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
curl "https://map.nways.ng/v1/homecodes/CM-YDE1-011-137-5"
200 OK
{
  "country": "CM",
  "home": "Intendance 137",
  "machine": "CM-YDE1-011-137-5",
  "check": 5,
  "name": "Intendance",
  "officialName": "Carrefour Intendance",
  "coverage": "official-street",
  "officialAddress": "Rue 1.014, Yaoundé",
  "nameProvisional": false,
  "municipality": "Yaoundé I",
  "fullLine": "Intendance 137",
  "spoken": "Intendance, 137",
  "status": "provisional",
  "issued": "bulk",
  "entrance": { "lat": 3.8663911, "lng": 11.5179308, "kind": "centre", "source": "map" },
  "location": { "lat": 3.8663911, "lng": 11.5179308 },
  "plusCode": "6FMHVG89+H53",
  "lote": { "class": "residential", "coverage": "official-street", "enclosed": false, "floorAreaM2": 169.5, "kind": "building", "official": "Rue 1.014, Yaoundé", "rule": "single", "structures": 1, "use": "residential" },
  "credit": "N-Ways Addressing for Cameroon, © N-WAYS LIMITED (nways.ng)",
  "creditUrl": "https://github.com/n-ways/open-addresses-cameroon"
}
FieldDescription
home, machineThe remembered and machine forms. Show home (or fullLine) to people; store machine.
fullLineThe code as it is said and painted: Intendance 137, Bonapriso 14 01.
checkThe check digit of the machine form, for systems; never show it to people.
officialNameThe area’s full name, for small print. Missing when it equals name.
coverage, officialAddressOn a coded street of Yaoundé or Douala, official-street and the council’s street: show it first, with the code beside it.
nameProvisionalThe council may still choose the short name. The number never changes; the name may change once, and the old one stays valid.
municipalityThe arrondissement. Context only, from the position: never needed to decode.
statusprovisional, confirmed (residents agreed) or retired (no home there any more; the number is never reused).
entrance, location, plusCodeWhere to go: the gate when it is mapped, else the main building, with its Plus Code.
lote, structuresThe 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).

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. A point in Douala I answers Douala Bar 1215.

cURL
curl "https://map.nways.ng/v1/homecodes/at?lat=4.05&lng=9.70"

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/cm_engine.py resolve Bonapriso 14 01. 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 arrondissement, and the registry server in server/ serves it from your own machine.

Host it yourself

You can serve Cameroon’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:

Shell
git clone https://github.com/n-ways/open-addresses-cameroon
cd open-addresses-cameroon/server
docker compose up -d

The 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 takeLicenceWhat it asks of you
The engine, the server and the toolsApache 2.0Keep the licence and NOTICE when you ship or change them.
The codes, the areas and the model (registry/, model/, engine/data/)ODbL 1.0Credit “N-Ways Addressing for Cameroon, © 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.0Credit 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.