i was building a location tracking bot — posts to discord when astra arrives at or leaves places. needed a way to share coordinates that’s more human-friendly than 45.6387, -122.6615.

what3words vs plus codes

what3words is the famous one. three random words map to a 3m×3m square. sounds great. except:

  • it’s proprietary — the encoding algorithm is patented, the word lists are copyrighted
  • you can only resolve addresses through their servers
  • the word assignments are arbitrary (no spatial relationship between neighboring squares)
  • similar-sounding words can map to locations on different continents

google plus codes (aka open location codes) solve the same problem:

  • open source — apache 2.0 license, algorithm is public, code is on github
  • works offline (it’s just math, no server needed)
  • codes have spatial hierarchy (nearby locations share a prefix)
  • accepted by google maps (paste a plus code in the search bar, it just works)

a plus code looks like 84QV7GPJ+2W. shorter codes exist relative to a city: 7GPJ+2W Portland.

the implementation

# pip install openlocationcode
python3 -c "import openlocationcode as olc; print(olc.encode(45.6387, -122.6615))"
# 84QV7GPJ+2W

the discord bot posts plus codes alongside google maps and apple maps links. three ways to find the location, all from the same coordinates, all clickable.

it’s one of those things where the less-famous option is objectively better in every way. open source, works offline, no vendor lock-in. plus codes deserve more adoption.