Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Agency ¶
type Agency struct { ID string `csv:"agency_id"` Name string `csv:"agency_name"` URL string `csv:"agency_url"` TimeZone string `csv:"agency_timezone"` Lang string `csv:"agency_lang"` Phone string `csv:"agency_phone"` FareURL string `csv:"agency_fare_url"` Email string `csv:"agency_email"` }
Agency is a transit agency that provides data in this feed
type Calendar ¶
type Calendar struct { ServiceID string `csv:"service_id"` Monday int64 `csv:"monday"` Tuesday int64 `csv:"tuesday"` Wednesday int64 `csv:"wednesday"` Thursday int64 `csv:"thursday"` Friday int64 `csv:"friday"` Saturday int64 `csv:"saturday"` Sunday int64 `csv:"sunday"` StartDate string `csv:"start_date"` EndDate string `csv:"end_date"` }
type CalendarDate ¶
type FareAttribute ¶
type Feed ¶
type Feed struct { FeedInfo *FeedInfo Stops []*Stop Routes []*Route Shapes []*Shape Agencies []*Agency Trips []*Trip StopTimes []*StopTimes Calendar []*Calendar CalendarDates []*CalendarDate FareAttributes []*FareAttribute FareRules []*FareRule Frequencies []*Frequency Transfers []*Transfer }
Feed contains all the individual parts of a GTFS Feed
func LoadFromDirectory ¶
LoadFromDirectory takes a directory that should contain all the required GTFS files
func LoadFromZip ¶
LoadFromZip takes a zip file that should contain all the required GTFS files
type Route ¶
type Route struct { ID string `csv:"route_id"` AgencyID string `csv:"agency_id"` ShortName string `csv:"route_short_name"` LongName string `csv:"route_long_name"` Desc string `csv:"route_desc"` Type RouteType `csv:"route_type"` URL string `csv:"route_url"` Color string `csv:"route_color"` TextColor string `csv:"route_text_color"` SortOrder int64 `csv:"route_sort_order"` }
Route is a group of trips that are displayed to riders as a single service
type RouteType ¶
type RouteType int64
RouteType describes the type of transportation used on a route
var ( // LightRail Used for Tram, Streetcar, Light rail. Any light rail or street level system within a metropolitan area. LightRail RouteType = 0 //Subway Used for subway, metro. Any underground rail system within a metropolitan area. Subway RouteType = 1 // Rail Used for intercity or long-distance travel Rail RouteType = 2 // Bus Used for short- and long-distance bus routes Bus RouteType = 3 // Ferry Used for short- and long-distance boat service Ferry RouteType = 4 //CableCar Used for street-level cable cars where the cable runs beneath the car CableCar RouteType = 5 //Gondola Used for Gondola, Suspended cable car. Typically used for aerial cable cars where the car is suspended from the cable Gondola RouteType = 6 //Funicular Used for any rail system designed for steep inclines Funicular RouteType = 7 )
type Stop ¶
type Stop struct { ID string `csv:"stop_id"` Code string `csv:"stop_code"` Name string `csv:"stop_name"` Desc string `csv:"stop_desc"` Latitude string `csv:"stop_lat"` Longitude string `csv:"stop_lon"` ZoneID string `csv:"zone_id"` URL string `csv:"stop_url"` LocationType string `csv:"location_type"` }
Stop is an individual location where vehicles pick up or drop off passengers
type StopTimes ¶
type StopTimes struct { TripID string `csv:"trip_id"` ArrivalTime string `csv:"arrival_time"` DepartureTime string `csv:"departure_time"` StopID string `csv:"stop_id"` StopSequence string `csv:"stop_sequence"` StopHeadsign string `csv:"stop_headsign"` PickupType int64 `csv:"pickup_type"` DropOffType int64 `csv:"drop_off_type"` ShapeDistTraveled string `csv:"shape_dist_traveled"` Timepoint int64 `csv:"timepoint"` }
type Trip ¶
type Trip struct { ID string `csv:"trip_id"` ServiceID string `csv:"service_id"` RouteID string `csv:"route_id"` HeadSign string `csv:"trip_headsign"` ShortName string `csv:"trip_short_name"` DirectionID int64 `csv:"direction_id"` BlockID string `csv:"block_id"` ShapeID string `csv:"shape_id"` WheelChairAccessible int64 `csv:"wheelchair_accessible"` BikesAllowed int64 `csv:"bikes_allowed"` }
Click to show internal directories.
Click to hide internal directories.