Words4Where is a method of sharing words instead of map coordinates. Words are easier to communicate and allow for better error checking.
what3words has a similar goal of replacing coordinates with words. While the end result looks similar, the method of how Words4Where works is very different.
Below is a quick comparison table with benefits of each solution shown.
|Variable precision (1-300m)||Precision set to 3m grid|
|3,610 wordlist||40,000+ english wordlist|
|Two or more words for a location||Three words for a location|
|Four words ≈ 5m accuracy||Three words = 3m accuracy|
|Error checking built in||Limited error checking|
|Wordlist published||Wordlist not published|
|Not patented||Patent encumbered|
|Complex word identification for location||Simple word identification for location|
|Englist only (currently)||Multiple languages|
|Same coverage for any language||Different languages have different coverage|
We provide a very simple online API for free use.
|Build Your Own||
The protocol is quite straightforward. If you have reasonable programming skills have a look below for more details on how the protocol works.
Step 1 The word index is used to lookup each word and convert it to a four digit number, preserving leading zeros. Therefore, the word "account" is in the 15th position in the index and is converted to 0014 as the first index position is not used. Note that the word index is not case sensitive.
Step 2 The numbers for each word are joined together (concatenated) into a single number. The Damm algorithm (Wikipedia) is then used to confirm the number is valid. If correct, the last digit is removed.
Step 3 The last three digits are then used to identify the starting location coordinates. A list of starting coordinates for each number is provided. The last three numbers are then removed. Note that starting coorinates include the capital of all countries, other major cities, plus remote location to improve coverage.
Step 4 Starting from right to left, groups of four digits are used to detirmine a bearing and distance from the starting location. The first three digits represent the bearing from 1-360°. The fourth digit represents the distance. To calculate the distance, the following formula is used:
Where 'DistantDigit' is the fourth digit. And 'Iteration' is the number of coordinate changes calculated so far. The first iteration being equal to one. This formula means that each additional word added provides higher precision.
After all digit groups have been processed, the final coordinates represent the target location for the words originally provided. Below is a diagram overview of the steps taken.
Calculating words from coordinates is not as straightforward as converting coordinates from words. This is because there are billions/trillions of possible combinations of bearings and distances to get from a starting coordinate to a target coordinate.
There are several different possible implementations for this:
An incremental brute force approach could try every combination looking for the most accurate result. While this approach will provide the best result, it could take a long time to process even with opitimisation.
A random brute force approach could randomly try combinations until a certain threshold is met or the best result selected within a finite processing time. While this is unlikley to produce the best result possible, it is simple to create and flexible.
The face and forward approach has each iteration of bearing and distances calculated to simply point towards the target and get as close to it with each step. Testing has shown this to require a significant number of steps (and therefore words) to achieve a reasonable accuracy.
A congvergence approach has the bearings and distances incrementally altered with each change checked to see if it has resulted in getting closer to the target. This approach works well to achieving a solution quickly and efficiently, however it will likely converge on a solution which is not optimal.
A randomly convergent approach is similar to the convergence approach above, but its starting bearings and distances are randomised. Also, after each solution is found a new round is run with a new starting set of random values. After a predifined set of consecutive runs achieves no improvement it is considered to be reasonably optimal. Note that this last option is the one we use and have found it to be the best so far. Further analysis is being conducted.