Results 1 to 8 of 8

Thread: Adress-tags in OpenStreetmap

  1. #1

    Default Adress-tags in OpenStreetmap

    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

    Code:
    ./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
    dilbert ;-)
    Wordpress-development - a Toolset: wpgear.org

  2. #2
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    11,144
    Blog Entries
    2

    Default Re: Adress-tags in OpenStreetmap

    Responded to this Post when it was reposted in the Development forum
    http://forums.opensuse.org/showthrea...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

  3. #3

    Default Re: Adress-tags in OpenStreetmap

    hello dear tsu

    thx for the answer.
    Quote Originally Posted by tsu2 View Post
    Responded to this Post when it was reposted in the Development forum
    http://forums.opensuse.org/showthrea...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
    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/D...ispielsammlung

    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
    dilbert ;-)
    Wordpress-development - a Toolset: wpgear.org

  4. #4
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    11,144
    Blog Entries
    2

    Default Re: Adress-tags in OpenStreetmap

    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

  5. #5

    Default Re: Adress-tags in OpenStreetmap

    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.

    Quote Originally Posted by tsu2 View Post
    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
    dilbert ;-)
    Wordpress-development - a Toolset: wpgear.org

  6. #6

    Default Re: Adress-tags in OpenStreetmap

    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

    Code:
    ./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?
    dilbert ;-)
    Wordpress-development - a Toolset: wpgear.org

  7. #7

    Default Re: Adress-tags in OpenStreetmap

    hello dear tsu
    Code:
    what i want to get is this following result:
    
    
    Code:
    /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 !?
    dilbert ;-)
    Wordpress-development - a Toolset: wpgear.org

  8. #8

    Default Re: Adress-tags in OpenStreetmap

    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
    dilbert ;-)
    Wordpress-development - a Toolset: wpgear.org

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •