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
Derek  
#1 Posted : Monday, September 23, 2013 9:24:47 PM(UTC)
Derek

Rank: Newbie

Groups: Registered
Joined: 9/23/2013(UTC)
Posts: 4
Location: Chicago

Thanks: 2 times
Hello, I was making an app which let users to browse through specific routes and it shows the shape on Google Maps. I want it to show the shape of the route for both directions (for regular buses), and currently I have been using GetRoutes to get every routes, and then I put the route_id into GetTripsByRoute to get the trips, and then I put the trip_id into GetShape. The problem is GetTripsByRoute is showing every single routes including routes on special days/times, and I can't separate the directions. Is there any way I can fetch the shape of both direction on normal days?

Thanks!

Edited by user Monday, September 23, 2013 9:29:03 PM(UTC)  | Reason: N/A

Ryan  
#2 Posted : Tuesday, September 24, 2013 8:00:37 AM(UTC)
Ryan

Rank: Administration

Groups: Administrators, Registered
Joined: 6/1/2011(UTC)
Posts: 88
United States
Location: Urbana

Thanks: 1 times
Was thanked: 6 time(s) in 6 post(s)
Hi Derek,

That's a really tough question to answer; It's a complexity of our system that I have been trying to deal with myself for some time. The problem is defining what actually makes up a route. The maps we show in the schedule book are created by our planners to show a snapshot of the "average" route, but on any given day (even regular weekdays) a bus will deviate significantly from that route for some trips. The data has to account for all of these deviations and exceptions and currently there's no way for us to distinguish on the back-end between regular trips and shapes and deviations.

The result of this is that if you display every shape for every trip on a route you are going to get a jumbled mess. Unfortunately, I don't have a great suggestion for you to get around this. One idea that I have kicked around in the past is to do some sort of analysis on how many times each shape is used on a route. Presumably the ones that are used often are going to be "regular" shapes and the ones that are only used once or twice are going to be some sort of deviation. I haven't actually tried this so I have no idea how it would actually work, but it seems like it may be a way to get a decently accurate snapshot of a route.

Sorry I couldn't be more help,

Ryan
thanks 1 user thanked Ryan for this useful post.
Derek on 9/24/2013(UTC)
Derek  
#3 Posted : Tuesday, September 24, 2013 12:55:58 PM(UTC)
Derek

Rank: Newbie

Groups: Registered
Joined: 9/23/2013(UTC)
Posts: 4
Location: Chicago

Thanks: 2 times
Thanks for the suggestion. Here's my plan: I am going to record the two most frequently appeared routes and assume them as the north/south or east west bound route. I will test it out and see if it works. Thanks!
Derek  
#4 Posted : Tuesday, September 24, 2013 9:06:18 PM(UTC)
Derek

Rank: Newbie

Groups: Registered
Joined: 9/23/2013(UTC)
Posts: 4
Location: Chicago

Thanks: 2 times
It works perfectly. Here's a screenshot:

UserPostedImage

(Sorry but I don't know how to make it smaller.)
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.