what3words is great for indicating the exact location. This coordinate system helps to find any square 3 x 3 meters on the planet. If you have not heard about the coordinates of three words, you can find out more about the service from our
welcome publication . However, with all the positive qualities of what3words, we can not use this technology in many cases. For example, to work with postal items, we have to specify the postal address, even though the courier can easily deliver the shipment directly to the door using what3words addresses. It would be convenient if the address of what3words could be transformed into a postal address directly on the website page, and of course, this is possible.
Very often at the moment when you want to order goods on the site, you need a zip code. For each such index is a huge number of streets. For example, in the UK there are 1.7 million postal codes and about 29 million delivery points. We have to admit that specifying a zip code for further search of the street is quite convenient, but this approach has its drawbacks. Maintaining up-to-date information about indices is quite labor-intensive, and new indices are not rarely created. Many difficulties arise from the fact that in different countries use a different approach to postal codes, and while the index in Russia may be about 100 streets, in Belgium thousands of streets can be assigned to one index.
what3words works anywhere in the world, and gives advantages not only to residents of densely populated cities, but also to those who are in rural areas or settlements with an imperfect addressing system. This is an excellent replacement for the zip code, the address of what3words is just as simple and concise, and at the same time, unlike the index, it can contain information about the exact location of the delivery point. In order to embed what3words on a website, it is enough to resort to a rather simple procedure of reverse geocoding - this is the process of turning coordinates into a postal address. This will require information about the streets and APIs, such as the free
Google API , which is well suited for reverse geocoding.
')
Google API example
And so, we need to take an address of three words, and convert it to a postal address. The mailing address is as follows: 111397, Russia, Moscow, 3rd Vladimirskaya Street 26, building 2, building 3. The address of this place in the coordinate system is what3words:
earth.pol . As an example of using the Google API, we take the work of Steve Caldwell from Crosstek. It uses the free
what3words API to convert addresses from three words to latitude and longitude, and then converts the resulting values to a postal address using the Google API. Steve built his converter on Meteor, you can get acquainted with his
demo , and learn more on
GitHub . He also described the whole process in his
blog .
OpenStreetMap usage example
Despite all the positive qualities of the API from Google, it has limitations on use. As a more free and open solution, you can use the data from the wonderful OpenStreetMap project. One of the participants in this project, David Earl, uses the OSM open source geocoder, which we know as
Nominatim . The quality of his work is different for different countries, but Nominatim does an excellent job with our example. David has kindly provided about 150 lines of his
PHP code , which you can test on your server under a GPL v2 license. You can also view his
demo .
Geocoding and routing
In addition, I would like to say that what3words addresses are also great for use by couriers. The use of three-word addresses eliminates the possibility of error, thanks to protection against typos and a special algorithm for working with dictionaries, which you can learn from our previous
publication . Unlike postal addresses, the w3w address can lead you directly to the front door, and you will always understand if the address was entered incorrectly, or there was an error in voice recognition. However, this is a topic for a separate publication.
Thank you for your attention! If you have ideas on using what3words coordinates in other areas, and you are ready to share them, we will be glad to hear your comments. You can always
contact us !