Hello and good day dear friends I am brandnew to GIS-Things, so please bear with me for asking a newbie question. I have an xslt that works on a split osm file[germany.osm.bz2] i took the file called germany.osm.bz2 from this site: http://ftp5.gwdg.de/pub/misc/openstreetmap/download.geofabrik.de/ Apparently, right now, i am not at home so i cannot give you a smaller piece of this large file. Note: i splitted it with XML_Split Regarding the expected output - i want to have ALL (!!) Nodes and data that are combined with the term restaurant... HTH - (End of update.) I am divin into the GIS-world with a headstart: As a example i I want to do is parse all elements of i visited the Doku for XAPI on Openstreetmap here: http://wiki.openstreetmap.org/wiki/Xapi Here ive found a little example to show a map with marker (with XSL Code): http://wiki.openstreetmap.org/wiki/OpenLayers_Marker Note: this is only an example: i guess if i can do this with one 'amenity'` - called restaurant then i can do it with others too. My first trial: What i am currently ironing out: i have a xslt-processor that runs and gives back some results..: 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 - and see where i stuck..
it gives back the following results and now you see where i stuck...:
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.. asked 17 Apr '12, 09:09 tagtheworld
showing 5 of 6
show 1 more comments
|
Sorry for the off-topic but... Do you really need to use xslt ?
I imagine in this forum you'll find more people able to help if you use one of osm's many parsing libraries (or even a standard xml parsing library) and a for_loop in the language of your choice rather than xslt (which is a rather unpopular technology).
hi vincent - thx for the quick help. I am pretty new to xslt and also new to xml too. but i am willing to learn - if any body can help me it would be a great pleasure to dive into another technology..
To add a little more to what Vincent de P said - some XML documents are governed by strict rules as to the values that they can contain. OSM isn't really like that - there's even a wiki document expaining that you can with caveats use any tags you like.
What might help a little is if you could explain a bit about what you're trying to do with the data. It may be that there's an existing service (such as the XAPI that allows you to get at what you want rather than starting with flat XML), or it may be that you need to put the OSM data in a database optimised for the task that you want to perform (for rendering map tiles for example, there are instructions here).
The problem is that alongside the name there are manu, many other tags that might get used alongside amenity=restaurant (see here for a list). Also, have a look at the "See Also" section of the amenity=restaurant wiki page for this that an establishment might get tagged as other than "restaurant".
hello dear SomeoneElse hello dear Vincent de p
many thanks for the answers and the hints. Great to see such support to a newbie i want to play with the data - and see how i can transform data fom one formate to another. Well if it is easy to work with XAPI or other methods - well ithougth that it would be pretty eays to enlarge the xslt to a enriched version - that covers some more entities - eg. the adress of the restaurant and some more stuff. Well i want to see how i can move the data into a database!`? Any idea or help greatly appreciated
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:
http://xapi.openstreetmap.org/api/0.6/node[amenity=restaurant][bbox=9.4908142,48.7810801,9.5660019,48.8387351]
well i get a blank page back - this is making me wondering...
... which continues into this question about the XAPI specificallly.