Email or username:

Password:

Forgot your password?
Top-level
OpenCage πŸ‘‰πŸŒ

2/ Here's the problem: addresses all over the world do not look the same.

Different countries do things differently, and sometimes there are even differences within countries.

Some countries have postcodes, other don't. Some have states/provinces or abbreviations in their address. And different pieces of the address are ordered differently. It's a mess. πŸ˜•

10 comments
OpenCage πŸ‘‰πŸŒ

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 wonderful, but ...

OpenCage πŸ‘‰πŸŒ

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.

It's not always simple.

OpenCage πŸ‘‰πŸŒ

5/ Many services get it wrong.

We call this the "Berlin, Berlin" bug.

In the United States πŸ‡ΊπŸ‡Έ it is normal to show <city>, <state> in the address. In Germany πŸ‡©πŸ‡ͺ , Berlin is both a city and a state, but no one ever refers to "Berlin, Berlin". Only American services do that.

OpenCage πŸ‘‰πŸŒ

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 pebble in your shoe πŸͺ¨πŸ‘Ÿ that keeps annoying you.

address-formatting is our open source project to know how to make addresses look right

OpenCage πŸ‘‰πŸŒ

7/ the address-formatting project is a collection of templates that let us know how to display an address for each country/territory (251 in total) in the world 🌎🌍🌏

github.com/OpenCageData/addres

OpenCage πŸ‘‰πŸŒ

8/ The address-formatting templates themselves can be used in any programming language, and there are now 11 different parsers. πŸ₯³

Yeah, open source!

OpenCage πŸ‘‰πŸŒ

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.

OpenCage πŸ‘‰πŸŒ

10/ We hope you enjoyed this week's #geoeducation thread, a small peek behind the curtain πŸͺŸ at life at a geocoding service.

We have links to many more geothreads about border disputes, exclaves, #geoweirdness of individual countries, reverse geocoding, etc listed on our blog:

blog.opencagedata.com/geothrea

OpenCage πŸ‘‰πŸŒ

11/ Bonus address formatting toot - there have been MANY different schemes to replace or supplement addresses using various codes or word combinations: What3Words, geohashes, H3 codes, MGRS codes, UN/LOCODES, etc. Each with pros and cons.

We return many of these different codes as "annotations" to our geocoding results, see: opencagedata.com/api#annotatio

Andreas Scherbaum

@opencage I tried resolving this in #OpenStreetMap, for my talk "Add Geocoordinates to your addresses in #PostgreSQL".

The results are ... wild!

andreas.scherbaum.la/writings/

Go Up