Email or username:

Password:

Forgot your password?
Top-level
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.

7 comments
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.

Example of the Berlin, Berlin bug in LinkedIn
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!

List of programming languages with address-formatting parsers
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.

Screenshot of JSON response from the OpenCage geocoding API for the coordinates 52.3877830, 9.7334394
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

Screenshot of the OpenCage blog page about geothreads
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

Screenshot of the OpenCage geocoding API documentation explaining the &quot;MGRS&quot; annotation
Go Up