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

using overpass_API for a simple address-tag-job

0

hello - i wanted to run a osmconvert & filter with the following goal - to get the following tags out of the datas:

addr:street addr:housenumber addr:city

so i decided to do the following command

./osmconvert hamburg-latest.osm.pbf --all-to-nodes -o=hamburgrestaurants_2.o5m
./osmfilter hamburgrestaurants_2.o5m --keep="amenity=restaurant" -o=restaurant_2.o5m
./osmconvert restaurant_2.o5m --csv="@id @lon @lat shop name  addr:street addr:housenumber addr:city website email" --csv-headline -o=restaurant_2.csv

but i failed - there were no streets no housenumbers and cities. Now i decidet to use overpass-API which seems to be less complicated. Can someone advice me here to go the first step.

asked 19 Apr '14, 10:46

say_hello_to_the_world's gravatar image

say_hello_to...
19232427
accept rate: 0%

edited 21 Apr '14, 16:16

neuhausr's gravatar image

neuhausr
7.5k870121


One Answer:

3

osmconvert is a bit picky when is comes to specifying csv field names. Especially extra whitespace characters seem to cause some issue. In your case you'll have to remove the superfluous space character between name and addr:street to get some results according to your csv string (of course only where this data exists in OSM in the first place).

./osmconvert restaurant_2.o5m --csv="@id @lon @lat shop name addr:street addr:housenumber addr:city website email" --csv-headline -o=restaurant_2.csv

answered 21 Apr '14, 07:27

mmd's gravatar image

mmd
5.7k15388
accept rate: 37%

thank you for the help. It helps alot - and gives new starting points. Greetings

(13 Jun '14, 09:44) say_hello_to...

Source code available on GitHub .