I am searching a database of all zipcodes / postal codes and the city districts (part of the cities) in the world. Is there some service like the GeoNames database? I spoke with GeoNames, but they don't have the relation between the zipcodes and the districts in their data.
-
1It seems to me that the concept of "city districts" is far from standard enough for a global database. For example, the city of Chicago can be divided into wards (political boundaries), community areas (social/demographic boundaries), and neighborhoods (popular boundaries). Which would you want?– Joe GermuskaAug 8, 2013 at 17:01
3 Answers
GeoNames does indeed provide the relationship between parts of cities and their postal codes. A few examples:
- Parts of London with the postal code EC1
- Postal codes of districts in Austria called Innere Stadt (Inner City)
You can either use GeoNames' Postal Codes Lookup Tool, or you can download the database dumps in text format for many countries.
The data is licensed under Creative Commons Attribution 3.0.
-
Dear Patrick, GeoNames has only the relation between zip code and city, but not the parts of the cities. Even their premium service has not this feature. I have already spoke with them. Here an example to see it: geonames.org/postalcode-search.html?q=50670&country=DE - it should come the district of Cologne and not only Cologne as city.– MutatosAug 7, 2013 at 18:47
If you saw a map of for example districts, and zipcodes, you would notice that they are more likely than not to have different borders.
For example my city shares a zipcode with another town (same county).
It shares a school district with a completely different town, in a different county.
The high school also hosts some classes for another town, that is in yet another county (mostly).
All three of those other towns are about the same distance away from my city, in almost completely opposite directions.
There was also an occurrence where a bunch of houses were in two school districts at the same time, in a nearby city.
( I know you weren't asking about school districts, but they are similar enough to hopefully get the point across )
So the problem you are facing is that the two pieces of data have almost no relation to one another.
The boundaries were most likely created by different governing bodies, at different times, who had different ideas about where to draw an arbitrary line.
You may get some overlap of lines, at a river for example, but such obvious places to put a line will be few and far between.
The best that you could do is find a high correlation between a set of places' districts, and their zipcodes. Also note that both can change over time.
Another option would be to get the coordinates of the boundaries, and figure it out that way.
There will however never be a definitive correlation.
-
Zip codes are even more complex, as there can be overlap -- zip codes are assigned to postal routes, and in some areas, you might have two routes overlap. (one carrier's handling east/west streets, the other north/south ... but this tends to be rural roads where it's miles between turns)– JoeAug 20, 2013 at 13:21