I downloaded a UTM32 shapefile (.cpg, .dbf, .prj, .shp, .shx file, where other available georeferences are GK3 and TM32) that shows the exclusive division of Germany in its municipalities. Above, I have a large dataset of subjects with their postal addresses (street, house number, zip code, city).
I would like to assign each subject to exactly one municipality using the postal address. I want the corresponding municipality's id (saved as attribute in the shapefile) to be attached to each subject in my database and export it, say, in a csv file.
However, I am not sure how to combine the shapefile with the addresses. I can imagine two approaches:
- Using Nominatim or other services I could geocode the postal addresses, i.e. convert them into lat/long coordinates. Let's assume for a second that I already did.
How can I add coordinate information to the shapefiles in order to achieve the assignment of subjects?
- There are also shapefiles for German Streets (Open Street Map etc.). Let's assume I have access to such data.
Is it in principle possible to place the municipality and the street layer on top of each other, locate each address on the street layer and identify the corresponding municipality on this basis?
Which one is practical?
I am using QGIS 2.6 and Mac OS X Yosemite.