Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type RouteLeg ¶
type RouteLeg struct { LegType string `json:"leg_type"` // transfer, walk, or trip LegBeginTime time.Time `json:"leg_begin_time,omitempty"` LegEndTime time.Time `json:"leg_end_time,omitempty"` LegDuration string `json:"leg_duration"` LegFromCoords [2]float64 `json:"leg_from_coords"` LegToCoords [2]float64 `json:"leg_to_coords"` // When LegType == "trip" will be present TripRoute *string `json:"trip_route,omitempty"` TripRouteHeadsign *string `json:"trip_route_headsign,omitempty"` TripFrom *string `json:"trip_from,omitempty"` TripFromSIDU *string `json:"-"` TripToSIDU *string `json:"-"` TripTo *string `json:"trip_to,omitempty"` TripStops *[]*RouteStopDetails `json:"trip_stops,omitempty"` TripFeedID *int `json:"trip_feed_id,omitempty"` TripAgencyID *string `json:"trip_agency_id,omitempty"` // When LegType == "walk" wil be present TransferFrom *string `json:"transfer_from,omitempty"` TransferTo *string `json:"transfer_to,omitempty"` TransferDdwell *string `json:"transfer_ddwell,omitempty"` TransferDactive *string `json:"transfer_dactive,omitempty"` TransferCategory *string `json:"transfer_category,omitempty"` TransferFeedIDs *[]int `json:"transfer_feed_ids,omitempty"` // When LegType == "transfer" will be present WalkTo *string `json:"walk_to,omitempty"` WalkFrom *string `json:"walk_from,omitempty"` WalkDistKm *float64 `json:"walk_dist_km,omitempty"` }
RouteLeg represents a 'leg' in a route which may be either of transfer, walk, or trip type (see the LegType field).
The Leg* properties are always present, Trip*, Transfer*, and Walk* fields may be nonnil depending on the LegType field.
func FormatConnectionsToLegTrip ¶
func FormatConnectionsToLegTrip( yyyymmdd uint, timezoneUTCDeltasecs int, legConnections []*dbt.ConnectionVerbose, ) *RouteLeg
type RouteStopDetails ¶
type RouteStopDetails struct { Time time.Time `json:"stop_time"` Name string `json:"stop_name"` Coords [2]float64 `json:"stop_coords"` ConnID string `json:"stop_conn_id"` }
RouteStopDetails represents a stop within a trip.
func FormatLegsStopDetails ¶
func FormatLegsStopDetails( yyyymmdd uint, timezoneUTCDeltasecs int, legConnections []*dbt.ConnectionVerbose, ) []*RouteStopDetails
Click to show internal directories.
Click to hide internal directories.