Open kenkyee opened 8 years ago
Fixed this by adding CapeFlyer as route #13 in generate/mbta_commuter_rail.py:
"CR-Newburyport": 12, "CapeFlyer": 13}
Thanks, I'll incorporate this change into the code base. Please let me know if you encounter any other problems getting this stuff set up!
@noisecapella : one other thing I noticed is the directionsStops table is empty. Is this a bug in the generator? I didn't see anything in the generator code that would fill this mapping table in. The directions table isn't too useful w/o this mapping table :-)
Sorry for the delay, I was on vacation. I'll take a look when I get home
I think I originally planned to populate that table but it turned out not to be necessary. The app only uses the directions table to convert the dirTag to a name and title to be displayed in the stop predictions and vehicle locations. Since the dirTags are unique there's no need to map it to a particular stop, at least for this particular app. Sorry for the late responses!
That makes sense. I have a different need...have to figure out which stops and directions are nearby for a particular route (e.g. inbound for bus route 9) and that directions table doesn't give me a list of stops w/ directions. Any suggestions on how to modify the current generator code to do this? I've been looking through the generator code but nothing looks obvious :-(
If you look at this example route config: http://webservices.nextbus.com/service/publicXMLFeed?command=routeConfig&r=71&a=mbta
There are two different stop
elements. The stop
s which are children of route
describe bus stops, and the stop
which are children of direction
describe stop tags within that direction. In the generator there's this line which prevents the XML parser from parsing the stop
elements within a direction
. You will need to change that to parse stop
elements within direction
elements. Please let me know if you need more guidance, the code is not very clean
Was trying to follow the autogenerate.sh docs and found it also needed "pip install requests" after installing python3.
But after that, it blew up trying to look up the key for CapeFlyer: