1/ To mix things up a bit on this site, we thought we'd experiment with using Fridays to post the occasional thread about geo topics we're often asked about. Today we'll start with one everyone thinks is simple, but really isn't: reverse geocoding 🧵🗺️⬅️
2/ Reverse geocoding is turning coordinates (lat,lng) into location info. So 51.952659, 7.632473 becomes "Friedrich-Ebert-Straße 7, 48153 Münster, Germany" (OpenCage HQ, as you can see on our demo page). So far, so simple, right? opencagedata.com/demo
3/ First question people ask is "why would I ever need that?" Well, main reason is tracking devices (GPS, etc) capture locations very precisely as coordinates. But one big problem - coords make no sense to humans ... 🌍🤔🤔🤔
4/ Humans think in terms of countries, cities, addresses, etc. Basic example: a rental car co might want to know if car left the country. Reverse geocoding converts vehicle coords into country. We work with many vehicle tracking companies 🚗🚗🚓🚐🚍opencagedata.com/solutions/vehi…
5/ Seems simple, but lots of things to consider. First up, different parts of world structured very differently, different hierarchies and ways to show addresses. We format the address as expected locally
6/ Of course most of the world has no hierarchy as all, it's water. We handle that as well.
7/ One small pet peeve - people often send us ultra precise coords. Like nanometer level. No real need for more than 6 places past the decimal, see: en.wikipedia.org/wiki/Decimal_d…
8/ Next issue - privacy. 🕵️♀️🕵️🕵️♂️Geocoding super precisely is technically cool, but can at times be a real privacy issue.
A website might want to show a user's neighbourhood, not their home address for example. Here's our guide: opencagedata.com/guides/how-to-…
9/ But by far the hardest part about reverse geocoding is that the world changes every day. OpenStreetMap alone has 5+ MILLION edits per day (keep up the good work everyone!)
10/ 🧑🎓👨🎓👩🎓 If you want to play around with the ideas from this thread, we have a tutorial on writing your own reverse geocoder opencagedata.com/reverse-geocod…
11/ You'll find the tutorial and much more in our reverse geocoding guide: opencagedata.com/reverse-geocod…
Please share with anyone who might find it interesting. 🙏
Have a good weekend, and happy geocoding! 🙌