Hi, I am using the Overpass API / Overpass Turbo to get a single relation (like http://overpass-turbo.eu/s/zog). Here I get the the relation including its members which are some nodes (these are the train stops), ways and some other relations:
For a java program I would like to first take the information from one of the ways. Then, in an other API request, ask for the information of its node members. But how can I find the members of a way by only having the information about its "type", "ref", and "role"? I guess I need something like the ID. I could use the "recursive down" function ">;" to get the nodes but doing so, I loose information about the sorting in which the nodes appear inside the way. In total I want to keep track of the sorting of the whole relation to create a elevation model (that is depending on the geographic coordinates of each node) later on. My current Overpass query is sorting the nodes and ways by its "role" tag, but how to sort these is another question. asked 07 Jun '18, 07:30 Tigerclaw1993 maxerickson |
The values given for ref are ids. Each way gives the order of the nodes, so you should be able to use The options for sorting the Overpass-API results are limited, either by id or using a geographic index. But trying to get results from Overpass-API in a significant order is probably an anti-pattern, better to just retrieve all the necessary data and do the ordering on the client. answered 07 Jun '18, 12:09 maxerickson Thanks a lot :)
(07 Jun '18, 14:32)
Tigerclaw1993
|