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 Name string Url *url.URL Timezone Timezone Lang LanguageISO6391 Phone string Fare_url *url.URL Email *mail.Address }
An Agency represents a transit agency in GTFS
type Date ¶
A Date object as used in GTFS
func GetGtfsDateFromTime ¶
GetGtfsDateFromTime constructs a GTFS Date object from a Time object
func (Date) GetOffsettedDate ¶
GetOffsettedDate returns a date offsetted by a certain number of days
type FareAttribute ¶
type FareAttribute struct { Id string Price string Currency_type string Payment_method int Transfers int Transfer_duration int Rules []*FareAttributeRule }
A FareAttribute is a single fare attribute that applies if certain FareAttributeRules are matched
type FareAttributeRule ¶
type FareAttributeRule struct { Route *Route Origin_id string // connection to Zone_id in Stop Destination_id string // connection to Zone_id in Stop Contains_id string // connection to Zone_id in Stop }
A FareAttributeRule holds rules which describe when a FareAttribute applies
type FeedInfo ¶
type FeedInfo struct { Publisher_name string Publisher_url *url.URL Lang string Start_date Date End_date Date Phone string Version string }
FeedInfo holds general information about a GTFS feed
type LanguageISO6391 ¶
type LanguageISO6391 struct {
// contains filtered or unexported fields
}
A LanguageISO6391 struct describes a language according to the ISO 6391 standard
func NewLanguageISO6391 ¶
func NewLanguageISO6391(tofind string) (LanguageISO6391, error)
NewLanguageISO6391 create a new LanguageISO6391 object
func (LanguageISO6391) GetLangString ¶
func (a LanguageISO6391) GetLangString() string
GetLangString returns the two-character string representation of an ISO 6391 language
type Route ¶
type Route struct { Id string Agency *Agency Short_name string Long_name string Desc string Type int16 Url *url.URL Color string Text_color string }
A Route describes a group of trips that are presented to passangers as a single service
type Service ¶
type Service struct { Id string Daymap [7]bool Start_date Date End_date Date Exceptions map[Date]int8 }
A Service object describes exactly on what days a trip is served
func (*Service) Equals ¶
Equals returns true if the service is exactly the same - that is if it is active on exactly the same days
func (*Service) GetExceptionTypeOn ¶
GetExceptionTypeOn returns the expection type on a particular day
func (*Service) GetFirstDefinedDate ¶
GetFirstDefinedDate returns the first date something is defined (either positively or negatively) in this service
func (*Service) GetLastDefinedDate ¶
GetLastDefinedDate returns the last date something is defined (either positively or negatively) in this service
func (*Service) IsActiveOn ¶
IsActiveOn returns true if the service is active on a particular date
type Shape ¶
type Shape struct { Id string Points ShapePoints }
A Shape describes the geographical path of one or multiple trips
type ShapePoint ¶
A ShapePoint is a single point in a Shape
func (*ShapePoint) HasDistanceTraveled ¶
func (p *ShapePoint) HasDistanceTraveled() bool
HasDistanceTraveled returns true if this ShapePoint has a measurement
func (*ShapePoint) String ¶
func (p *ShapePoint) String() string
Get a string representation of a ShapePoint
type ShapePoints ¶
type ShapePoints []ShapePoint
ShapePoints are multiple ShapePoints
func (ShapePoints) Len ¶
func (shapePoints ShapePoints) Len() int
func (ShapePoints) Less ¶
func (shapePoints ShapePoints) Less(i, j int) bool
func (ShapePoints) Swap ¶
func (shapePoints ShapePoints) Swap(i, j int)
type Stop ¶
type Stop struct { Id string Code string Name string Desc string Lat float32 Lon float32 Zone_id string Url *url.URL Location_type bool Parent_station *Stop Timezone Timezone Wheelchair_boarding int8 }
A Stop object describes a single stop location
type StopTime ¶
type StopTime struct { Arrival_time Time Departure_time Time Stop *Stop Sequence int Headsign string Pickup_type int8 Drop_off_type int8 Shape_dist_traveled float32 Timepoint bool Has_dist bool }
A StopTime is a single stop with times on a trip
func (StopTime) HasDistanceTraveled ¶
HasDistanceTraveled returns true if this ShapePoint has a measurement
type Time ¶
Time is a simple GTFS time type
func (Time) GetLocationTime ¶
GetLocationTime returns the time.Time of the gtfs time on a certain date, for a certain agency (which itself holds a timezone)
func (Time) SecondsSinceMidnight ¶
SecondsSinceMidnight returns the number of seconds since midnight
type Timezone ¶
type Timezone struct {
// contains filtered or unexported fields
}
A Timezone describes a single timezone in the world
func NewTimezone ¶
NewTimezone creates a new timezone object
func (Timezone) GetLocation ¶
GetLocation constructs a time.Location object from this GTFS timezone
func (Timezone) GetTzString ¶
GetTzString returns the string representation of a timesone
type Trip ¶
type Trip struct { Id string Route *Route Service *Service Headsign string Short_name string Direction_id int8 Block_id string Shape *Shape Wheelchair_accessible int8 Bikes_allowed int8 StopTimes StopTimes Frequencies []Frequency }
A Trip is a single vehicle trip traveling through the network with specific times