google / transitfeed

A Python library for reading, validating, and writing transit schedule information in the GTFS format.
https://github.com/google/transitfeed/wiki
Apache License 2.0
681 stars 254 forks source link

Preserver the routes order from routes.txt #360

Open bdferris opened 10 years ago

bdferris commented 10 years ago

From powc...@gmail.com on March 02, 2013 07:37:23

What steps will reproduce the problem? 1. loader = transitfeed.Loader(path, memory_db=False)

  1. self.schedule = loader.Load()
  2. self.schedule.GetRouteList() # list by definition has a certain order of elements What is the expected output? What do you see instead? The result of Schedule.GetRouteList() is a list of routes in random order. It would be nice, if this routine returned the routes in the order defined by the GTFS publisher. What version of the product are you using? On what operating system? transitfeed-1.2.12 Please provide any additional information below. Schedule.routes is a regular dictionary. A possible solution would be, to change it to collections.OrderedDict

Original issue: http://code.google.com/p/googletransitdatafeed/issues/detail?id=360

bdferris commented 10 years ago

From bdfer...@google.com on September 26, 2014 09:51:53

(No comment was entered for this change.)

Labels: Language-Python