amtrak icon indicating copy to clipboard operation
amtrak copied to clipboard

Question: Fetch trains within X miles of city

Open ZoomBug58 opened this issue 3 years ago • 4 comments

Hi, is it possible to fetch all trains within a specific miles of a city?

ZoomBug58 avatar Jan 15 '22 17:01 ZoomBug58

Currently no, but that shouldn't be too hard to implement. I could jot it down to implement in my rewrite.

piemadd avatar Jan 15 '22 21:01 piemadd

Also in an upcoming update, you'll be able to get the coordinates of each station and use that data to achieve this.

piemadd avatar Jan 15 '22 21:01 piemadd

Also in an upcoming update, you'll be able to get the coordinates of each station and use that data to achieve this.

Thing is I'm trying to get all trains within x miles of a city, not just the ones stopping at that city/station.

ZoomBug58 avatar Jan 16 '22 23:01 ZoomBug58

not just the ones stopping at that city/station.

I am aware. The function returning station information will also have the coordinates of that station, so you could use some math to figure out which trains are in x miles of said station, regardless of if they're stopping there.

piemadd avatar Jan 19 '22 23:01 piemadd