proposal: add a field for rider-facing stop codes

84 views
Skip to first unread message

Joe Hughes

unread,
Jun 8, 2007, 1:25:14 AM6/8/07
to Google Transit Feed Spec Changes
Summary:
Add the ability to specify a short code for each stop that transit
riders can use to identify that stop.

Motivation:
Many transit systems have stop codes that are displayed on signage,
schedules, and other rider-facing materials. These are often used in
phone-based transit information systems to make it easier for riders
to get schedule or real-time arrival information for a particular
stop. They can also be used to confirm that the rider is at the
correct stop. A stop code field in the feed would allow feed
publishers to share this information with transit applications.

Proposal:
The following field would be added to the stops.txt file:

stop_code (optional):
A short rider-visible code (usually a short number) that uniquely
identifies the stop. This should only be provided if the code is
displayed on stop signage, timetables, and/or other rider-oriented
materials. This can be left blank for stops without a code.

Testing:
TriMet will test this proposal on their feed, more test data would be
appreciated!

Comments?

Joe Hughes
Google Transit

Joe Hughes

unread,
Nov 28, 2007, 7:34:44 PM11/28/07
to Google Transit Feed Spec Changes
Just a quick update to mention that this proposed extension has now
been tested end-to-end.

TriMet is now publishing stop_code values in their feed:
http://developer.trimet.org/GTFS.shtml

Brett Warden, also a member of this group, has used that stop_code
information in his GTFS-to-GPS exporter:
http://headwayblog.com/2007/11/13/gtfs-to-gps/

Since it seems to have worked as intended in practice, we plan to add
the stop_code field to the official spec in the next update. Thanks
to TriMet and Brett for testing this extension!

Joe Hughes
Google

Brett....@gmail.com

unread,
Nov 29, 2007, 11:49:19 AM11/29/07
to Google Transit Feed Spec Changes
On Nov 28, 4:34 pm, "Joe Hughes" <joe.hughes.c...@gmail.com> wrote:
> Brett Warden, also a member of this group, has used that stop_code
> information in his GTFS-to-GPS exporter:http://headwayblog.com/2007/11/13/gtfs-to-gps/
>
> Since it seems to have worked as intended in practice, we plan to add
> the stop_code field to the official spec in the next update. Thanks
> to TriMet and Brett for testing this extension!

Actually, at this point, my code uses stop_id. This just prompted me
to look at it more closely and I found out that in TriMet's 20071202
feed, there are three stops with no stop_code defined: 93, 193, and
208. I have no idea why.

I'll change my code to use stop_code, but fall back to stop_id if
stop_code is not defined.

-- Brett Warden

Joe Hughes

unread,
Nov 29, 2007, 12:42:00 PM11/29/07
to gtfs-c...@googlegroups.com
Thanks for the clarification, Brett--let us know if you encounter any
other issues. I will say that it's generally not a good idea to
expose stop_id to riders, even as a fallback; while it may happen to
work for TriMet's feed, you can't rely on the fact that the values in
that field will be meaningful to riders.

Joe

Brett....@gmail.com

unread,
Nov 29, 2007, 1:44:33 PM11/29/07
to Google Transit Feed Spec Changes
On Nov 29, 9:42 am, "Joe Hughes" <joe.hughes.c...@gmail.com> wrote:

Hmmm... I changed my code and was going to run it again, but the
20071202 TriMet feed was updated last night and the files stops.txt
and stop_amenities.txt now have no data!

-- Brett Warden

Mike Gilligan

unread,
Nov 30, 2007, 12:41:42 PM11/30/07
to Google Transit Feed Spec Changes
There was an error in the export and I am working on it now.

BTW, stop codes are not defined for the 93, 193, and 208 because they
are not publicly accessible and are only used internally.

On Nov 29, 10:44 am, "Brett.War...@gmail.com" <Brett.War...@gmail.com>
wrote:

Brett....@gmail.com

unread,
Dec 3, 2007, 12:46:26 PM12/3/07
to Google Transit Feed Spec Changes
On Nov 30, 9:41 am, Mike Gilligan <mgilli...@gmail.com> wrote:
>
> BTW, stop codes are not defined for the 93, 193, and 208 because they
> are not publicly accessible and are only used internally.

Looking through the data, I found, for example, stop 193 (SW Barbur &
Terwilliger) listed in the schedule for bus 12-Barbur Blvd:

http://www.trimet.org/schedules/w/t1012_1.htm

Just want to make sure I'm not missing something :0

Thanks,

-- Brett Warden

Mike Gilligan

unread,
Dec 4, 2007, 12:13:12 PM12/4/07
to Google Transit Feed Spec Changes
My mistake. I applied the filter to stop_ids, not route_ids. It will
be fixed in our next upload (sometime between December 10-14).

-Mike

On Dec 3, 9:46 am, "Brett.War...@gmail.com" <Brett.War...@gmail.com>
wrote:
Reply all
Reply to author
Forward
0 new messages