Troubleshooting shapes issues on Google Transit

A few general guidelines:

  1. Shape points should be ideally spaced no greater than 40m apart. We have an algorithm which automatically guesses at how to apply your shape. In many cases, we do a good job.
  2. One shape per pattern. A pattern is a set of trips which traverse the same street network. For example, if a route has South bound trips and North bound trips, you have two patterns: North bound and South bound. You will need two shapes: one for the set of South bound trips and one for the set of North bound trips. If some North bound trips have detours, you may have additional patterns and therefore need more shapes.
  3. Routes with excessive looping and in lining will require the use of the shape_dist_traveled field in both the stop_times.txt and shapes.txt. The shape_dist_traveled field allows you to specify exactly how the stops in the stop_times.txt file fit into their respective shape. A common value to use for the shape_dist_traveled field is the distance from the beginning of the shape as traveled by the vehicle (think something like an odometer reading). Please note this differs from the straight line distance as the straight line distance is not how the vehicle actually travels through the street network.

Recommendation: Do what's easiest first and iterate if necessary.

  • Provide shapes as best as you can.
  • Iterate using the guidelines for specific shapes which are not being correctly applied.