I want to query the Overpass Api to find out the distance of special relations (railways). The request is fine, and returns me all relation
, way
and node
objects I'm interested in. Example for Hamburg:
[out:json];(rel(53.55224324163863, 10.006766589408304, 53.55314275836137, 10.008081410591696)["route"="train"];>;);out body;
In Overpass, each relation
object has members defining this relation. For way
objects you can resolve the lat/lon of its node
attributes and calculate the distance for that way. If you sum up all the way distances it seems to be reasonable.
However, there are members from that relation
of the type node
(most of the time, they have a role
of "stop") which seem to represent the right order of stops from that relation
. But instead being in between the members, they are roughly at the end.
If I try to look the stops up inside the ways, they are not all present. How am I supposed to calculate the distance between two particular stops?