A free, hierarchical, self-checking geocode (CC0)
Project description
ordloc
A free, hierarchical, self-checking geocode. Public domain (CC0).
Every ~2 m square on Earth gets a speakable address, in your choice of three interchangeable forms:
standard edge.suit.paddle.trust.magic 5 common words + checksum
lite drainage.rapid.journey.elongated 4 words + parity bit
compact hinir-fanur-ligim 17 chars, for URLs/QR codes
ordloc — from Swedish ord, "word".
Why another geocode?
Because the popular word-based one is proprietary, and the open ones aren't speakable. ordloc gives you all of the following at once, which no existing scheme does:
- Free forever. CC0 spec, ~150 lines of public math, MIT/CC-licensed wordlists. No license, no SDK, no company that can disappear and take your addresses with it. Works fully offline.
- Hierarchical. Drop trailing words to zoom out:
edge.suit.paddleis the ~280 m neighborhood containingedge.suit.paddle.trust.magic. Nearby places share leading words, so codes sort and index spatially. - Self-checking. Standard codes embed a CRC-8: a misheard word is detected 99.6% of the time instead of silently pointing 200 km away.
- Uniform. Built on S2 cells: ~2.2 m cells at the equator and at 78°N alike. Worst-case decode error 1.79 m (beats a 3 m square).
- Forgiving. First four letters of each word suffice:
edge.suit.padd.trus.magidecodes identically.
Usage
pip install . # or: pip install -r requirements.txt
$ ordloc encode 58.5260 13.4870
standard edge.suit.paddle.trust.magic
lite drainage.rapid.journey.elongated
compact hinir-fanur-ligim
$ ordloc decode edge.suit.paddle.trust.magic
lat=58.526002 lon=13.487010 cell~2.2 m (level 22) check=ok
As a library:
from ordloc import encode_standard, decode_words
code = encode_standard(58.5260, 13.4870)
lat, lon, edge_m, level, check = decode_words(code)
Files
ordloc/ reference implementation + CLI + wordlists
test_ordloc.py test suite (run: python test_ordloc.py)
SPEC.md implementation-grade specification
requirements.txt runtime dependency (s2sphere)
pyproject.toml pip-installable package definition
LICENSE CC0 1.0 dedication
Choosing a profile
Use standard by default — the checksum matters whenever a human relays a code by voice. Use lite when matching the 3-4 word length of other systems matters more than error detection. Use compact in URLs, QR codes, filenames, and logs.
Status & roadmap
v0.2, prototype quality. Known limitations and welcome contributions:
- JavaScript/browser port (needs a standalone S2 implementation)
- Localized wordlists (BIP-39 community lists exist for 10+ languages)
- Hilbert locality is statistical: points straddling S2 face edges don't share prefixes
- The 4096 list's edit-distance curation is heuristic; a phonetic (soundex/metaphone) pass would strengthen it
Related work
Plus Codes (Open Location Code) pioneered the open grid geocode; Geohash the hierarchical hash; what3words the word-triplet UX; ThisPlace (Placeware) an early open geohash-to-words experiment; proquints the pronounceable bit encoding. ordloc combines the open hierarchy of the first two with the speakability of the rest, and adds checksums.
Author
Magnus Strömberg — github@magnus.tech
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ordloc-0.2.0.tar.gz.
File metadata
- Download URL: ordloc-0.2.0.tar.gz
- Upload date:
- Size: 24.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4e03a126985fe62fdd365162d920b363fdb891116ff7c967e7cc9e4349715f8f
|
|
| MD5 |
719d43956783209a8ce76bb13b690ee8
|
|
| BLAKE2b-256 |
e051cad29bfbbe621b27e5487ca437bb0b598525ab2e9d58a76f83838ef8da44
|
File details
Details for the file ordloc-0.2.0-py3-none-any.whl.
File metadata
- Download URL: ordloc-0.2.0-py3-none-any.whl
- Upload date:
- Size: 26.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3df6aa4e25734bac535cb78b572e7f6e9b17c62948073f18060ce75b0532c961
|
|
| MD5 |
ad318e34946fad16cc3ff6a304a974bc
|
|
| BLAKE2b-256 |
88a4c398e27f8b8f88200234d468da424d063e9aacf426d7725b19a8443c4ffb
|