I want to find the middle station (in terms of time) between two stations, I’m currently trying to use the Journey API to get the distance between two stations as a first step but I’m having trouble with that too.
Could anyone point me in the right direction? Is this available in the API? If not, how could I work it out?
Using /Line/Route/Sequence, you could take the latitude/longitude for the two stops, work out the mid-point between them and then iterate through the stops in between to see which one is nearest to that point. It’s not exact as it assumes straight-line travel and a constant speed, but should give a reasonable approximation.
Alternatively you could look at /Line/Timetable and use stopInterval times to work out the nearest to a mid-journey point.
@russjohnhop
Thanks for the reply. For me it would usually be a matter of what we want to do after meeting but I suppose it would minimise time if exchanging presents, or other unspecified merchandise!