zero padding on trip_short_name

27 views
Skip to first unread message

Brian Card

unread,
May 24, 2016, 12:35:29 AM5/24/16
to massdotd...@googlegroups.com
It looks like some of the short names have leading zeros in the trips.txt file while others do not.  Can you take a look at this and see if any updates need to be made?  Here's an example of a trip without a leading zero and one with a leading zero:

"CR-Newburyport","CR-Weekday-Newburyport-Dec14","CR-Newburyport-CR-Weekday-Newburyport-Dec14-95","Rockport","95",0,,"9810007",1

"CR-Greenbush","CR-Weekday-Greenbush-Dec13","CR-Greenbush-CR-Weekday-Greenbush-Dec13-074","South Station","074",1,,"9900001",1


Developer at MBTA

unread,
May 24, 2016, 10:22:37 AM5/24/16
to MBTA Developers
Hi Brian,

This is a long-standing issue which was actually fixed by the new Commuter Rail schedule. In the past, the leading zeroes were used on the Greenbush Line to distinguish from similarly-numbered trips on the Newburyport/Rockport Line. With the new schedule, the two-digit trains have been removed from the Newburyport/Rockport Line (note that the one you referenced is no longer valid; it is part of an old service_id which expired last Friday). Currently all two-digit train numbers are padded with a leading zero in the trip_short_name field; this is consistent with the way these trains are shown to customers on the printed schedules.

Sincerely,

Developer@MBTA

StefanW

unread,
Jun 2, 2016, 6:56:31 PM6/2/16
to MBTA Developers
I just realized my post yesterday about the leading zero in the Departures feed was incorrect... the Departures feed is correct (with leading zero for Greenbush, Kingston/Plymouth, Middleborough/Lakeville). 

It's the "old" Commuter Rail feeds which don't have the leading zero as they should.

Example: 
TimeStamp,Trip,Destination,Stop,Scheduled,Flag,Vehicle,Latitude,Longitude,Heading,Speed,Lateness
1464908011,25,Middleborough/ Lakeville,South Station,1464907920,pre,1712,42.35091,-71.05539,199,3,0
1464908011,23,Middleborough/ Lakeville,Middleborough/ Lakeville,1464908100,pre,1815,41.92898,-70.93545,159,69,0

Should I / we do a work-around for this since this "old" feed is going to go away someday? (I have no problem doing so.)

Thanks for any advice!

Reply all
Reply to author
Forward
0 new messages