Results 1 to 2 of 2

Thread: trying to refactor a osmfilter-processor to do better work

  1. #1

    Default trying to refactor a osmfilter-processor to do better work

    hello dear openstreetmap experts


    new to the gis-technique: i am workin with the following tools:

    this

    Code:
        http://wiki.openstreetmap.org/wiki/DE:Osmconvert
    and that

    Code:
        http://wiki.openstreetmap.org/wiki/DE:Osmfilter
    i run the following example:

    Code:
        wget download.geofabrik.de/openstreetmap/europe/germany.osm.pbf
        osmconvert germany.osm.pbf --all-to-nodes -o=germany.o5m
        osmfilter germany.o5m --keep="amenity=shop or shop=*" -o=shops.o5m
        osmconvert shops.o5m --csv="@id @lon @lat shop name" --csv-headline -o=shops.csv
    that runs fine - now i want to refine:

    to get such a result- [made out of xslt]

    Code:
        <node id="52768810" lat="48.2044749" lon="11.3249434" version="7" changeset="9490517" user="wheelmap_visitor" uid="290680" timestamp="2013-10-07T20:24:46Z">
        <tag k="addr:city" v="Olching" />
        <tag k="addr:country" v="DE" />
        <tag k="addr:housenumber" v="72" />
        <tag k="addr:postcode" v="82140" />
        <tag k="addr:street" v="Hauptstraße" />
        <tag k="amenity" v="restaurant" />
        <tag k="cuisine" v="mexican" />
        <tag k="email" v="info@cantina-olching.de" />
        <tag k="name" v="La Cantina" />
        <tag k="opening_hours" v="Mo-Su 17:00-01:00" />
        <tag k="phone" v="+49 (8142) 444393" />
        <tag k="website" v="http://www.cantina-olching.com/" />
        <tag k="wheelchair" v="no" />
    doable!?
    dilbert ;-)
    Wordpress-development - a Toolset: wpgear.org

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

    Default Re: trying to refactor a osmfilter-processor to do better work

    See my response to your other similar post which applies equally here.
    http://forums.opensuse.org/showthrea...do-better-work

    By using something like logstash, instead of a proprietary or semi-proprietary approach to parsing and tagging your data, Logstash enables you to do this in JSON (not too different than straight XSL) but with more defined hierarchy, structure and clarity, particularly if you are interested in processing your data through a nosql database like Elasticsearch (or for that matter, solr on hadoop). Of course, if you still want to export your parsed, tagged and transformed data in another format, Logstash can do that for you, too.

    HTH,
    TSU

Posting Permissions

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