Email or username:

Password:

Forgot your password?
OpenCage πŸ‘‰πŸŒ

Let's close out the week with a geo thread. This time #geoeducation rather than #geoweirdness

Today's topic is one that doesn't get as much respect as it should.
Ask most people about geocoding, they automatically think forward geocoding - turning text (an address or placename) into coordinates.

Today though we'll cover the opposite: reverse geocoding

1/n

11 comments
OpenCage πŸ‘‰πŸŒ

2/ Reverse geocoding is turning coordinates (latitude, longitude) into location info.

So 52.3877830, 9.7334394 becomes "Philipsbornstraße 2, 30165 Hanover, Germany" as you can see on our demo page.

opencagedata.com/demo

Those are the coordinates of OpenCage HQ, BTW

So far, so simple, right?

#geoeducation

OpenCage πŸ‘‰πŸŒ

3/ The first question people usually ask is "why would I ever need that?"

Well, the main reason is tracking devices (GPS, etc) capture locations very precisely as coordinates.

But there is one big problem - coordinates make no sense to humans πŸ€”πŸ€”πŸ€” ...

OpenCage πŸ‘‰πŸŒ

4/ Humans think in terms of countries, cities, neighbourhoods, addresses, etc. NOT coordinates.

Here's a basic example: a rental car company might want to know if their car left the country.

Reverse geocoding converts vehicle coords into country.

We work with many vehicle πŸš—πŸšπŸ›»πŸšš 🚌 tracking companies

opencagedata.com/solutions/veh

OpenCage πŸ‘‰πŸŒ

5/ Reverse geocoding may seems simple, but there are lots of things to consider.

First up, different parts of world are structured very differently, with different admin hierarchies and ways to show addresses.

We format the address as expected locally.

BTW - the templates we use to do it are open sourced: github.com/OpenCageData/addres Pull requests gladly received!

#geoeducation

OpenCage πŸ‘‰πŸŒ

6/ Of course most of the world has no hierarchy as all, it's water. We handle that as well.

See our thread on geocoding the oceans: en.osm.town/@opencage/11020778

OpenCage πŸ‘‰πŸŒ

7/ One small reverse geocoding pet peeve - people often send our geocoding API ultra precise coordinates. Like nanometer level.

There is no real need for more than 6 places past the decimal, see:

en.wikipedia.org/wiki/Decimal_

#geoeducation

OpenCage πŸ‘‰πŸŒ

8/ Next issue - privacy πŸ•΅οΈπŸ•΅οΈβ€β™‚οΈπŸ•΅οΈβ€β™€οΈ

Geocoding super precisely is technically cool, but can at times be a real privacy issue.

For example a website might want to show a user's neighbourhood, not their specific home address.

Here's our guide to geocoding "coarsely"

opencagedata.com/guides/how-to

#geoeducation

OpenCage πŸ‘‰πŸŒ

9/ But by far the hardest part about reverse geocoding is that the world changes all day, every day.

There is continual new construction, demolition, address changes, changes of all kinds.

#OpenStreetMap alone has 5+ MILLION edits per day (keep up the good work everyone!)

OpenCage πŸ‘‰πŸŒ

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/guides/how-to

or of course you can just try out our API

#geoeducation

Ilya Zverev

@opencage Regarding reverse geocoding with OpenStreetMap, there are some other complications one should be aware of. Like polygons and interpolations. I'd recommend my own FOSDEM talk, "Reverse Geocoding Is Not Easy":

youtube.com/watch?v=sjE6xy0BBg

Go Up