Launix releases ZIP code database

map

Do you know this? You miss the radius search for zip codes - especially in areas like Upper Lusity, a simple search by city does not work, but you have to search within an area.

Zip codes and the federal states

Federal stateNumber of zip codes
Baden-Württemberg1200
Bavaria2069
Berlin191
Brandenburg221
Bremen40
Hamburg101
Hesse542
Mecklenburg-Western Pomerania190
Lower Saxony821
North Rhine-Westphalia864
Rhineland-Palatinate659
Saarland69
Saxony399
Saxony-Anhalt214
Schleswig-Holstein443
Thuringia224

German postal codes linked with geodata

If you link the postal codes with the geographic coordinates Lon and Lat, you can mark a specific point on the map of Germany where this postal code is located. Lon refers to the longitude, while Lat is the latitude. The distance between two latitudes is 111.3 km, while the distance between two longitudes varies. Locations at the equator are 111.3 km apart per degree, whereas at the North and South Poles, the distance is 0 km per degree. The exact distance between two longitudes is 111.3 km * cos(Lat).

With this knowledge, you can calculate the distance between two geographic coordinates, namely according to the Pythagorean theorem √(x²+y²), where x is the distance along the longitude in km and y is the distance along the latitude in km. If you know two postal codes, you can look up their geographic position in the database and then calculate the distance.

Postal CodeMunicipalityDistrictFederal stateLonLat
02708LöbauRosenbach bei Löbau, Lawalde, Obercunnersdorf bei ...Saxony14.669747948738151.09043191711079
02727NeugersdorfNeugersdorf, SaxonySaxony14.61279859922750.9740627941025
02730EbersbachEbersbach / SaxonySaxony14.611414830863251.0138119490906
02733CunewaldeCunewaldeSaxony14.528158264986551.0993958694855
02736OppachBeiersdorf bei Löbau, Eichen, OppachSaxony14.516982898707151.06631832719129

Download the database

You can download the complete database as a MySQL dump: https://launix.de/ablage/PLZ.sql . Alternatively, we offer a CSV file:

The data is in the public domain. If you cannot do much with the raw data but would still like to use functions such as the radius search, contact us.

Categories
Tags