Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MatchedTripData ¶
type MatchedTripData map[string]*tripData
MatchedTripData is a mapping from trip_id→tripData that represents trips matched with brigades
func Match ¶
func Match(api *ttableAPI, gtfs *gtfs.Gtfs, stopTimesReader io.Reader) (matches MatchedTripData, err error)
Match matches trips to brigade ids
func (MatchedTripData) MarshalJSON ¶
func (m MatchedTripData) MarshalJSON() ([]byte, error)
MarshalJSON marshals a MatchedTripData into JSON. This JSON has a different structure then MatchedTripData - nested objects will be used:
{ "{ROUTE_ID}": { "{BRIGADE_ID}": [ { "trip_id": "{TRIP_ID}", "last_stop_id": "{STOP_ID}", "last_stop_pos": [lat, lon], // an array of 2 floats "last_stop_timepoint": "HH:MM:SS" } ] }
Click to show internal directories.
Click to hide internal directories.