logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Login


Options
View
Go to last post Go to first unread
Peter Zich  
#1 Posted : Saturday, August 27, 2011 7:36:29 PM(UTC)
Peter Zich

Rank: Newbie

Groups: Registered
Joined: 8/25/2011(UTC)
Posts: 7
Location: Champaign, IL

Thanks: 1 times
I just tried using routes.getListByStop and noticed that is does not return the direction for the route. As it doesn't accept the shorter and more generic stop_id (e.g. "1STDAN" instead of "1STDAN:1") or the stop_code it would make sense for it to include direction.

My plan is to present the user with stops and the busses that pass through that stop. I'd like them to be able to get just the busses in a particular direction (e.g. the 1st and Daniel stop on the westbound side, with just the 22N buses) but both show up as "First & Daniel" with the same stop code and the 22 "Illini" and 220 "Illini Evening" running through them without an indication of direction.
Peter Zich  
#2 Posted : Saturday, August 27, 2011 7:40:43 PM(UTC)
Peter Zich

Rank: Newbie

Groups: Registered
Joined: 8/25/2011(UTC)
Posts: 7
Location: Champaign, IL

Thanks: 1 times
Just to clarify: I realize that departures.getListByStop has the direction, but there is no way to guarantee that every type of bus that runs through that stop would have a departure in the near future.
Sean  
#3 Posted : Monday, August 29, 2011 3:02:33 PM(UTC)
Sean

Rank: Administration

Groups: Administrators
Joined: 4/11/2011(UTC)
Posts: 42

Was thanked: 3 time(s) in 3 post(s)
So there are actually a few issues with this. First off, I think you're trying to over simplify the system a bit. Both directions of a route can hit the exact same stop. For instance, the 1N and 1S Yellow go to the same stop (MKTPLC:1) at Market Place Mall. This can occur at other stops too.

Secondly, there are issues on our side. If you look at trips in GTFS the only field for direction is bit which doesn't tell you much. On top of that, 0 might mean east for some routes but west for another in our GTFS export which is what powers most of the API. The trip_headsign field usually has a direction in it, but there are some legacy things going on with the 9A & 9B.

So long story short, we'll try to keep working something out because we realize this is a shortcoming of the API, but we don't have a solution for you at the moment. Sorry Peter...
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.