luqmaan/Instabus

Which routes are nearby?

Closed this issue · 1 comments

We need new data to answer this question. In the iOS version this could be done querying SQLite https://github.com/luqmaan/MetroRappid-iOS/blob/a-nu-start/MetroRappid/GTFSDB.m#L220-L248.

But since one of the goals of Instabus is to not have a server dependency, these queries need to be computed beforehand. Ideally the results would be stored as JSON.


Actually we can do this using the Transitime APIs. http://transitime-host.cloudapp.net/api/v1/key/f18a8240/agency/cap-metro/command/predictionsByLoc?lat=30.290556&lon=-97.747654

You can see a proof-of-concept I made on the nearby-stops branch. It logs all the routes available on nearby stops to the console. This implementation depends on an extra ~240KB JSON file, and an npm module.