gtfs

package
v0.0.0-...-ddf5634 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 23, 2021 License: GPL-2.0 Imports: 2 Imported by: 0

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      string
	Timezone string
	Lang     string
	Phone    string
	Fare_url string
}

type Date

type Date struct {
	Day   int8
	Month int8
	Year  int16
}

func (Date) GetTime

func (d Date) GetTime() time.Time

type FareAttribute

type FareAttribute struct {
	Id                string
	Price             string
	Currency_type     string
	Payment_method    int
	Transfers         int
	Transfer_duration int
	Rules             []*FareAttributeRule
}

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
}

type FeedInfo

type FeedInfo struct {
	Publisher_name string
	Publisher_url  string
	Lang           string
	Start_date     Date
	End_date       Date
	Phone          string
	Version        string
}

type Frequency

type Frequency struct {
	Start_time   string
	End_time     string
	Headway_secs int
	Exact_times  bool
}

type Route

type Route struct {
	Id         string
	Agency     *Agency
	Short_name string
	Long_name  string
	Desc       string
	Type       int
	Url        string
	Color      string
	Text_color string
}

type Service

type Service struct {
	Id         string
	Daymap     [7]bool
	Start_date Date
	End_date   Date
	Exceptions []*ServiceException
}

func (Service) GetExceptionTypeOn

func (s Service) GetExceptionTypeOn(d Date) int8

func (Service) IsActiveOn

func (s Service) IsActiveOn(d Date) bool

type ServiceException

type ServiceException struct {
	Date Date
	Type int8
}

type Shape

type Shape struct {
	Id     string
	Points ShapePoints
}

func (Shape) String

func (shape Shape) String() string

Get a string representation of this shape

type ShapePoint

type ShapePoint struct {
	Lat           float32
	Lon           float32
	Sequence      int
	Dist_traveled float32
}

func (ShapePoint) String

func (shape ShapePoint) String() string

Get a string representation of a ShapePoint

type ShapePoints

type ShapePoints []*ShapePoint

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                 string
	Location_type       int
	Parent_station      string
	Timezone            string
	Wheelchair_boarding int
}

type StopTime

type StopTime struct {
	Arrival_time        string
	Departure_time      string
	Stop                *Stop
	Sequence            int
	Headsign            string
	Pickup_type         int
	Drop_off_type       int
	Shape_dist_traveled float32
	Timepoint           bool
}

type StopTimes

type StopTimes []*StopTime

func (StopTimes) Len

func (stopTimes StopTimes) Len() int

func (StopTimes) Less

func (stopTimes StopTimes) Less(i, j int) bool

func (StopTimes) Swap

func (stopTimes StopTimes) Swap(i, j int)

type Transfer

type Transfer struct {
	From_stop         *Stop
	To_stop           *Stop
	Transfer_type     int
	Min_transfer_time int
}

type Trip

type Trip struct {
	Id                    string
	Route                 *Route
	Service               *Service
	Headsign              string
	Short_name            string
	Direction_id          int
	Block_id              string
	Shape                 *Shape
	Wheelchair_accessible int
	Bikes_allowed         int
	StopTimes             StopTimes
	Frequencies           []*Frequency
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL