hello dear linux experts
what i am trying to do now is …a little task
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
cf http://wiki.openstreetmap.org/wiki/Key:addr
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
what is wrong with this?
i really love to hear from you
many many greetings
martin
tsu2
April 19, 2014, 11:04pm
#2
Responded to this Post when it was reposted in the Development forum
http://forums.opensuse.org/showthread.php/497091-trying-to-refactor-a-osmfilter-processor-to-do-better-work
Recommended a more leading approach to parsing and tagging data, using Logstash. Also extended the answer to what you might do with the data after it has been transformed, which is to import into a nosql database with appropriate querying tools.
TSU
hello dear tsu
thx for the answer.
i will digg deeper in to the logstash - technique.
aare there some in - depth going manuals and examples
see the options i have with overpass-api
http://overpass-api.de/query_form.html
and the examples.
http://wiki.openstreetmap.org/wiki/DE:Overpass_API/Beispielsammlung
sure thing - as for now - i did not digg very deep into the techniques
a. osmconvert and osmfilter
b. logstash
c. overpass-api
i need a simple technique
and i will tryout all
look forward to hear from you
greetings - and happy happy easter season
tsu2
April 22, 2014, 5:13am
#4
Logstash uses grok to parse each line entry.
You can search for all the information and documentation you want and examples on the web that relates to grok.
Once you have parsed each line entry into fields (of your own choosing or using someone else’ pattern),
Logstash then provides you the ability to
Assign a tag to any fields
Transform (modify) any field data if the default data is not exactly how you want it
Route the data wherever, eg your analysis tool, a queueing app, a querying app, graphical display, an aggregator, etc.
Logstash a pretty cool tool that will do all those things for you.
TSU
hi there - great to hear from you
currently i am in easter season so the answer is short now. i give you more details according my needs ideas and whishes.
tsu2:
Logstash uses grok to parse each line entry.
You can search for all the information and documentation you want and examples on the web that relates to grok.
Once you have parsed each line entry into fields (of your own choosing or using someone else’ pattern),
Logstash then provides you the ability to
Assign a tag to any fields
Transform (modify) any field data if the default data is not exactly how you want it
Route the data wherever, eg your analysis tool, a queueing app, a querying app, graphical display, an aggregator, etc.
Logstash a pretty cool tool that will do all those things for you.
TSU
TSU - i look forward to learn more bout Logstach. I need a good and in depth going manual . that would be great
look forward to hear from you
hello dear TSU
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.
what can i do - can i solve it with logstach?
hello dear tsu
what i want to get is this following result:
/tmp$ osmconvert my_gooddata_.o5m --csv="@id @lon @lat shop name addr:street addr:housenumber addr:city website email" --csv-headline | more
@id @lon @lat shop name addr:street addr:housenumber addr:city website email
29950894 11.7415509 48.3978074 Parkcafe Am Wörth 23 Freising http://www.parkcafe-freising.de
32559987 11.7841034 47.8785126 Waldrestaurant Maxlmühle Maxlmühle 2 Valley http://www.maxlmuehle.de/
33047448 11.1863664 47.9072486 Hirschberg-Alm
34034075 11.6704030 48.1169551 Zum Goldenen Stern Gartenstadtstraße 6 München
34072038 11.6707224 48.1093154 Franziskaner Garten Friedenspromenade 45 München http://www.franziskanergarten.de/
hmm i guess that i have made something wrong in the applcation of the tags!? What !?
hello and good evening - a little update: i found out what was wrong here:
**Issue: **there’s an extra space between “name” and “addr:street” in the above mentioned osmconvert csv string.
when i remove it and all will be set.
just want to share this solution with all others
greetings dilbert