I have the following script working so that in the resulting file I get a list of all districts and their ways and their nodes and the nodes themselves (but in the file it's in reverse order and with a flat hierarchy)
Now I can't figure out how to get this structured, so that in the end it's not flat but so that the relation nodes have their member nodes (type="way"), and so that the member nodes themselves have long-lat nodes (all structured) asked 15 Apr '13, 20:45 SeWo |
I suggest
This prints for each relation first the relation and then the ways and nodes belonging to this relation. Ways and nodes that belong to more than one relation are repeated to appear after each relation where they belong to. You can even do the same thing with the ways:
Or let the ways and relations appear after their members:
answered 16 Apr '13, 06:20 Roland Olbricht 1
Again, note that as a way can belong to multiple relations and nodes can belong to multiple ways and relations, the resulting file will likely be bigger (and take longer to generate) than the flat version. The hierarchy you're looking for doesn't exist in that form in OSM; depending on what you do, it might be less error-prone to embrace the OSM data structure directly.
(16 Apr '13, 09:23)
Vincent de P... ♦
well it really builds some structures, but it's not what I wanted... I guess I'll build a script that parses all the data, builds a data-structure itself and then writes my kml file which is what I need in the end
(16 Apr '13, 17:14)
SeWo
thanks anyway ;)
(16 Apr '13, 17:14)
SeWo
|