luqmaan / Instabus

:bus::dash: There is no need to bus upset
http://instabus.org
GNU General Public License v3.0
74 stars 13 forks source link

Fix MetroRail route #13

Closed drmaples closed 10 years ago

drmaples commented 10 years ago

should go all the way to Cedar Park

luqmaan commented 10 years ago

Right now the shape json for the MetroRail is incorrect, as it does not go all the way to Leander http://www.kenaltes.com/Capital_MetroRail_Red_Line_Map.jpg.

I think this is because I chose the wrong trip_id/shape_id. The correct one to choose is the shape for the current time of day. But, that is not possible because the GTFS data is only precise to the day. So, the only way to choose a shape without losing data is to choose the shape with the most points.

Create a python script for this for creating the correct shape json. Feel free to change the keys and structure of the json, we adapt the Yavascript to it. See https://github.com/luqmaan/MetroRappid/blob/a-nu-start/MetroRappid/GTFSDB.m#L151

  1. Load the trips for route 550
  2. Load the shapes for those trips
  3. Choose the shape with the most number of points
  4. Export that shape to JSON, see https://github.com/luqmaan/GhettoRappid/blob/2f8cb5ca3a72cde78bd8194cff89980e502558de/data/shapes_550_0.json

Ideally we should be able to adapt this script to generate the stops json, like https://github.com/luqmaan/GhettoRappid/blob/2f8cb5ca3a72cde78bd8194cff89980e502558de/data/stops_550_0.json.

For stops, see https://github.com/luqmaan/MetroRappid/blob/dev/MetroRappid/GTFSDB.m#L90. However, I think this query may be incorrect in that it should choose the trip with the most stops, but does not.

luqmaan commented 10 years ago

:thumbsup: :bear: