Time to celebrate. π₯³ We hit a nice milestone last week when @theHyphyDude submitted a pull request on our address-formatting project. The PR added a link to a #golang project that uses our templates.
So what is address-formatting?
github.com/OpenCageData/aβ¦
ππ§΅π
2/ Here's the problem: addresses all over the world are different. Different countries do things differently, and sometimes there are even differences within countries.
3/ Meanwhile the global OpenStreetMap community is continually collecting all kinds of data about the world, which is great. πͺπΊοΈ This can go to intense detail: every tree, park bench, foot path, etc. That's great, but ...
4/ When someone sends our API a geocoding request, we look in the database and see all kinds of stuff. We need to sift through it, and turn it into a well formatted address that matches the local way of presenting addresses that makes sense for that location.
5/ Sounds simple, but many services get it wrong. We call this the "Berlin, Berlin" bug. In the US πΊπΈ it is normal to show <city>, <state>. In Germany π©πͺ, Berlin is both a city and a state, but no one ever refers to "Berlin, Berlin". Only American services do that.
6/ Subtle i18n details like this add up to make a service feel natural and easy to use (or not).
When it's not right it's like the tiny stone in your shoe πͺ¨π that keeps annoying you.
address-formatting is our open source project to know how to make addresses look right
7/ the address-formatting project is a collection of templates that let us know how to display an address for each country/territory (248 in total) in the world π
github.com/OpenCageData/aβ¦
8/ The address-formatting templates themselves can be used in any programming language, with last week's PR adding #golang there are now 10 different parsers. π₯³ Yeah, open source!
9/ most importantly we have hundreds of tests. We're always adding more, and welcome your suggestions. There is no shortage of global addressing edge cases.
You can see address-formatting in action in the "formatted" string in our geocoding API results
Hope you enjoyed this week's peek behind the curtain πͺ at life at a geocoding service.
We have many more geothreads about border disputes, exclaves, reverse geocoding, etc listed on our blog: blog.opencagedata.com/post/geothreadβ¦
Have questions? Get in touch.
Share this Scrolly Tale with your friends.
A Scrolly Tale is a new way to read Twitter threads with a more visually immersive experience.
Discover more beautiful Scrolly Tales like this.