This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

.OSM or .OSM.PBF export all streetnames and matching cityname and postcode

0

I'm trying to get a table of all streets of a entire country, which means the file I'm working with is big. I want the streets to be in this kind of pattern:

column 1: street name; column 2: city name; column 3: postcode; (optional) column 4 suburban name;

Can be in a different format as long as every street has its postcode and city, so I can work with it.

I've already had success by going line by line and checking for a addr:city and then check the next lines for addr:street, addr:postcode and addr:suburban. There is just one problem: There are addr:street without an addr:city or addr:postcode so that only works for 72% (percentage of streets with city and postcode) of the streets. The other 28% can't be connected to any city nor postcode.

I've tried to work with osmfilter but I can't get it to work :(

help is greatly appreciated.

asked 19 Oct '22, 22:24

needforstreets's gravatar image

needforstreets
11112
accept rate: 0%

Source code available on GitHub .