leg

Namespace: (default namespace)
XML Schema: ns0.xsd

One leg of a trip -- that is, a temporally continuous piece of the journey that takes place on a particular vehicle (or on foot).

XML

Attributes

name type description
mode string The mode (e.g., Walk) used when traversing this leg.
route string For transit legs, the route of the bus or train being used. For non-transit legs, the name of the street being traversed.
agencyName string (no documentation provided)
agencyUrl string (no documentation provided)
agencyTimeZoneOffset int (no documentation provided)
routeColor string For transit leg, the route's (background) color (if one exists). For non-transit legs, null.
routeType int For transit legs, the type of the route. Non transit -1 When 0-7: 0 Tram, 1 Subway, 2 Train, 3 Bus, 4 Ferry, 5 Cable Car, 6 Gondola, 7 Funicular When equal or highter than 100, it is coded using the Hierarchical Vehicle Type (HVT) codes from the European TPEG standard Also see http://groups.google.com/group/gtfs-changes/msg/ed917a69cf8c5bef
routeId string For transit legs, the ID of the route. For non-transit legs, null.
routeTextColor string For transit leg, the route's text color (if one exists). For non-transit legs, null.
interlineWithPreviousLeg boolean For transit legs, if the rider should stay on the vehicle as it changes route names.
tripShortName string For transit leg, the trip's short name (if one exists). For non-transit legs, null.
tripBlockId string For transit leg, the trip's block ID (if one exists). For non-transit legs, null.
headsign string For transit legs, the headsign of the bus or train being used. For non-transit legs, null.
agencyId string For transit legs, the ID of the transit agency that operates the service used for this leg. For non-transit legs, null.
tripId string For transit legs, the ID of the trip. For non-transit legs, null.
serviceDate string For transit legs, the service date of the trip. For non-transit legs, null.
routeShortName string (no documentation provided)
routeLongName string (no documentation provided)
boardRule string (no documentation provided)
alightRule string (no documentation provided)
rentedBike boolean (no documentation provided)

Elements

name (type) min/max
occurs
description
startTime (dateTime) 0/1 The date and time this leg begins.
endTime (dateTime) 0/1 The date and time this leg ends.
departureDelay (int) 1/1 For transit leg, the offset from the scheduled departure-time of the boarding stop in this leg. "scheduled time of departure at boarding stop" = startTime - departureDelay
arrivalDelay (int) 1/1 For transit leg, the offset from the scheduled arrival-time of the alighting stop in this leg. "scheduled time of arrival at alighting stop" = endTime - arrivalDelay
realTime (boolean) 0/1 Whether there is real-time data about this Leg
isNonExactFrequency (boolean) 0/1 Is this a frequency-based trip with non-strict departure times?
headway (int) 0/1 The best estimate of the time between two arriving vehicles. This is particularly important for non-strict frequency trips, but could become important for real-time trips, strict frequency trips, and scheduled trips with empirical headways.
distance (double) 0/1 The distance traveled while traversing the leg in meters.
pathway (boolean) 0/1 Is this leg a traversing pathways?
from (place) 0/1 The Place where the leg originates.
to (place) 0/1 The Place where the leg begins.
intermediateStops/stop (place) 0/unbounded For transit legs, intermediate stops between the Place where the leg originates and the Place where the leg ends. For non-transit legs, null. This field is optional i.e. it is always null unless "showIntermediateStops" parameter is set to "true" in the planner request.
legGeometry (encodedPolylineBean) 0/1 The leg's geometry.
steps/walkSteps (walkStep) 0/unbounded A series of turn by turn instructions used for walking, biking and driving.
notes (note) 0/unbounded Deprecated field formerly used for notes -- will be removed. See alerts
alerts (alert) 0/unbounded
duration (double) 1/1 The leg's duration in seconds