Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Hello and good day,

I am brand new to GIS and to this forum so please bear with me for asking a newbie question. I have an xslt that works on a split osm file[germany.osm.bz2]

What I want to do is parse all elements of 'amenity' and @v='restaurant.

In other words i want to gather all "available" elements (nodes, ways and relations) to match the elements I need to rework the given filter below so that we can get all elements.... See the current XSLT -

<xsl:stylesheet version = '1.0'

    <xsl:output method="text" encoding="UTF-8"/>
    <xsl:template match="/">

            <xsl:for-each select="xml_split:root/node/tag[@k='amenity' and @v='restaurant']">
            <xsl:value-of select="../@id"/>
            <xsl:value-of select="../@lat"/>
            <xsl:value-of select="../@lon"/>
            <xsl:for-each select="../tag[@k='name']">
                <xsl:value-of select="@v"/>


it gives back the following results

"27376049   49.6499423  8.5543447   Clubhaus SC Olympia Lorsch"
"27407910   49.7045590  8.5115993   Forsthaus Jägersburg"
"27433397   51.4588114  7.0073003   Unperfekthaus"
"27433643   50.0081188  9.0691993   Schützenhaus"
"27453754   49.6358087  8.4547972   Feldschlössel"
"27474067   50.1880211  9.1742722   Pizzeria A66"
"27475403   49.0062148  8.3369945   Marty's Restaurant"
"27505752   48.4081456  11.7959129  Gasthof Nagerl"
"27530181   49.5054702  8.7089191   Zum Pflug"

I want to have a more in depth results with all tags. What modifications do I need to make to the xslt-file?

I hope that I was able to ask the question correctly. If you have any questions do not hesitate to ask..

Update: moved the question - thx to Stev_K. Thx for all your help here. Guess that the question has a far more appropiate place at Stackoverflow!

share|improve this question
not sure, but you might find more knowledge on the OSM mailing lists or help.openstreetmap.org. Not sure this is even a GIS-specific question - should it be on Stack Overflow? –  Stev_k Apr 15 '12 at 23:59
hello deaar Stev - thx for writing back - well according my humble opinion and ideas here, i think it is a GIS.-realted question. We need to know some thng bout the entity and design of the OSM . i want to parse the files and get something out of it. I look forward to hear from you - many many greetings matze –  zero Apr 16 '12 at 0:23
moved the question - thx to Stev_K. Thx for all your help here. Guess that the question has a far more appropiate place at Stackoverflow! –  zero Apr 16 '12 at 7:32
hi stev_k can i do some requests on POIs of Openstreetmap with XAPI. doing like so: i send a request to the API-Server - over http as a respond i get the following result - in XML example: the following link gives back all the Nodes of the Type amenity=restaurant in XML-Format. the bounding box (bbox) limits the area: xapi.openstreetmap.org/api/0.6/… what do you say!? –  zero Apr 17 '12 at 22:04
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.