Free TTC Mobile iPhone app @ bit.ly/ttcmobile (Support)

TTC Routes & Schedules Data

November 3rd, 2009

Since I was sick of flipping pages, I decided to retype the TTC data format info here. (see below) It’s tab delimited … and in the process I discovered the longitude and latitude was dropped from stopdetail… sigh. Although, looking at the originally posted stopdetail file, it had problems. e.g.:

1614 0 n.b. on UNIVERSITY at COLLEGE 1 0 43659720.0 -79390193.0 QUEEN’S PARK (Transfer to bus on street) 8126
And there are clues of how the data was exported — headers? — embedded in the file:
GF_ID 0 gf_onst_dir.b. on GF_ONST at GF_ATST 0 0 0.0 0.0 0
Actually … that GF_ID line is still there in the re-posted stopdetail file. It’s at the bottom of the sorted txt file.
routedetails: a valid list of routes
100N A 200801 100A FLEMINGDON PARK To DON MILLS & WYNFORD FLEMINGDON PARK - 1 171
  • routeid is the route number with direction (100N)
  • branchcode is the route branch letter. “_” indicates the main route (A)
  • version number associated with this schedule (200801)
  • full route description (100A FLEMINGDON PARK To DON MILLS & WYNFORD)
  • abbreviated routename (FLEMINGDON PARK)
  • routetype future use (-)
  • active indicates status (in service vs. out of service vs. future). There should be only one current version of any route and any number of future or past versions. Currently set to 1, or current. (1)
  • start date and end date future use. Intended to show when a future route will take effect or when a current or past route has ceased service (tabs)
  • frequent service text future use. Used to indicate routes with frequent service (10 minutes or less). (171)

scheduleitem: scheduled vehicle arrival times for each stop per route

100N _ 200801 1765 0 1 05:35   

  • routeid is the route number with direction (100N)
  • branchcode is the route branch letter. “_” indicates the main route (A)
  • version number associated with this schedule (200801)
  • stopid, unique stop number (1765)
  • vehicleindex future use (0)
  • day indicates which day(s) the schedule applies to (1)
    • 1 = Weekday, 2 = Saturday, 3 = Sunday, 4+ = Holiday
  • time. Scheduled arrival time or the time of the previous vehicle if this is a frequent service window (05:35)
  • fsendtime is the time of the vehicle following a frequent service window, or null if this piece of the schedule refers to a specific vehicle. (blank/null)

routestop: a list of stops for each route
5N   C 200801 1053 1 0 1 0 0
  • routeid is the route number with direction (5N)
  • branchcode is the route branch letter. “_” indicates the main route (C)
  • version number associated with this schedule (200801)
  • stopid, unique stop number (1053)
  • routestopid stop order for each route/branch (1)
  • routestopdirection sort order, used in conjunction with routestopid (0)
    • 0 = ascending, 1 = descending
  • fareid future use indicates payment method (1)
    • always set to 1 = normal fare, tickets and/or subway tokens
  • faretoboard future use indicates if additional fares are required to board the vehicle, e.g. downtown express routes. default is 1 (1)
  • faretopass future use indicates if the stop is a demarcation for additional fares. 1 = additional fare required (0)
  • transfer required future use indicates whether a transfer is needed to switch between surface and subway, default is 0. (0)

stopdetail: detailed information for each stop

1053 0 e.b. on ELM at UNIVERSITY FARSIDE 1 0 43656493.0 -79387899.0 6328

  • stopid, unique stop number (1053)
  • station indicates whether this is a subway station or a surface stop (0)
    • 1 = station, 0 = surface

  • name stop description (e.b. on ELM at UNIVERSITY FARSIDE)
  • accessible indicates if stop is accessible (1)
  • washroom future use (0)
  • longitude (43656493.0)
  • latitude (-79387899.0)
  • subwayconnection subway station that a surface route connects to. (6328)


View Comments
blog comments powered by Disqus