0

I want to find all zip code and its corresponding city name, country name in Europe.

My initial idea is to query osm data which contains tag like:

<tag k="addr:city" v="München"/>
<tag k="addr:country" v="DE"/>
<tag k="addr:housenumber" v="10"/>
<tag k="addr:postcode" v="80538"/>

The result should be a dictionary which key is the zip code and value is a tuple composed of city and country name.

How could I query the OSM, for example through http://overpass-turbo.eu/ to get the raw information? Is there any better way?

matrixanomaly
  • 6,627
  • 2
  • 35
  • 58
Hello lad
  • 17,344
  • 46
  • 127
  • 200

1 Answers1

2

That kind of data structure you are looking for is the basis for every so called 'geocoder' as nominatim. I recommend to look over there: https://wiki.openstreetmap.org/wiki/Nominatim
https://wiki.openstreetmap.org/wiki/Nominatim/Development_overview

hd1
  • 33,938
  • 5
  • 80
  • 91
MaM
  • 2,043
  • 10
  • 20