gtfs

package
v0.0.0-...-73876c2 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2024 License: GPL-3.0 Imports: 28 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 `csv:"agency_id"`
	Name     string `csv:"agency_name"`
	URL      string `csv:"agency_url"`
	Timezone string `csv:"agency_timezone"`
	Language string `csv:"agency_lang"`
	Phone    string `csv:"agency_phone"`
	FareURL  string `csv:"agency_fare_url"`
	Email    string `csv:"agency_email"`

	NOC string `csv:"agency_noc"` // UK ONLY
}

type Calendar

type Calendar struct {
	ServiceID string `csv:"service_id"`
	Monday    int    `csv:"monday"`
	Tuesday   int    `csv:"tuesday"`
	Wednesday int    `csv:"wednesday"`
	Thursday  int    `csv:"thursday"`
	Friday    int    `csv:"friday"`
	Saturday  int    `csv:"saturday"`
	Sunday    int    `csv:"sunday"`
	Start     string `csv:"start_date"`
	End       string `csv:"end_date"`
}

func (*Calendar) GetRunningDays

func (c *Calendar) GetRunningDays() []string

type CalendarDate

type CalendarDate struct {
	ServiceID     string `csv:"service_id"`
	Date          string `csv:"date"`
	ExceptionType int    `csv:"exception_type"`
}

type DatabaseBatchProcessingQueue

type DatabaseBatchProcessingQueue struct {
	Collection   string
	BatchTimeout time.Duration
	EmptyTimeout time.Duration
	// contains filtered or unexported fields
}

func NewDatabaseBatchProcessingQueue

func NewDatabaseBatchProcessingQueue(collection string, batchTimeout time.Duration, emptyTimeout time.Duration, batchSize int) DatabaseBatchProcessingQueue

func (*DatabaseBatchProcessingQueue) Add

func (*DatabaseBatchProcessingQueue) Process

func (b *DatabaseBatchProcessingQueue) Process()

func (*DatabaseBatchProcessingQueue) Wait

func (b *DatabaseBatchProcessingQueue) Wait()

type Frequency

type Frequency struct {
	TripID         string `csv:"trip_id"`
	StartTime      string `csv:"start_time"`
	EndTime        string `csv:"end_time"`
	HeadwaySeconds int    `csv:"headway_secs"`
	ExactTimes     string `csv:"exact_times"`
}

type Realtime

type Realtime struct {
	// contains filtered or unexported fields
}

func (*Realtime) Import

func (r *Realtime) Import(dataset datasets.DataSet, datasource *ctdf.DataSource) error

func (*Realtime) ParseFile

func (r *Realtime) ParseFile(reader io.Reader) error

func (*Realtime) SetupRealtimeQueue

func (r *Realtime) SetupRealtimeQueue(queue rmq.Queue)

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"`
	Description       string `csv:"route_desc"`
	URL               string `csv:"route_url"`
	Colour            string `csv:"route_color"`
	TextColour        string `csv:"route_text_color"`
	NetworkID         string `csv:"network_id"`
	Type              int    `csv:"route_type"`
	SortOrder         int    `csv:"route_sort_order"`
	ContinuousPickup  int    `csv:"continuous_pickup"`
	ContinuousDropOff int    `csv:"continuous_drop_off"`
}

type Schedule

type Schedule struct {
	Agencies      []Agency
	Stops         []Stop
	Routes        []Route
	Trips         []Trip
	StopTimes     []StopTime
	Calendars     []Calendar
	CalendarDates []CalendarDate
	Frequencies   []Frequency
	Shapes        []Shape
}

func (*Schedule) Import

func (g *Schedule) Import(dataset datasets.DataSet, datasource *ctdf.DataSource) error

func (*Schedule) ParseFile

func (gtfs *Schedule) ParseFile(reader io.Reader) error

type Shape

type Shape struct {
	ID               string  `csv:"shape_id"`
	PointLatitude    float64 `csv:"shape_pt_lat"`
	PointLongitude   float64 `csv:"shape_pt_lon"`
	PointSequence    int     `csv:"shape_pt_sequence"`
	DistanceTraveled float64 `csv:"shape_dist_traveled"`
}

type Stop

type Stop struct {
	ID           string  `csv:"stop_id"`
	Code         string  `csv:"stop_code"`
	Name         string  `csv:"stop_name"`
	Description  string  `csv:"stop_desc"`
	Latitude     float64 `csv:"stop_lat"`
	Longitude    float64 `csv:"stop_lon"`
	ZoneID       string  `csv:"zone_id"`
	URL          string  `csv:"stop_url"`
	Type         string  `csv:"location_type"`
	Parent       string  `csv:"parent_station"`
	Timezone     string  `csv:"stop_timezone"`
	Wheelchair   string  `csv:"wheelchair_boarding"`
	LevelID      string  `csv:"level_id"`
	PlatformCode string  `csv:"platform_code"`
}

type StopTime

type StopTime struct {
	TripID        string `csv:"trip_id"`
	ArrivalTime   string `csv:"arrival_time"`
	DepartureTime string `csv:"departure_time"`
	StopID        string `csv:"stop_id"`
	StopHeadsign  string `csv:"stop_headsign"`
	StopSequence  int    `csv:"stop_sequence"`
	PickupType    int    `csv:"pickup_type"`
	DropOffType   int    `csv:"drop_off_type"`
}

type Trip

type Trip struct {
	RouteID              string `csv:"route_id"`
	ServiceID            string `csv:"service_id"`
	ID                   string `csv:"trip_id"`
	Headsign             string `csv:"trip_headsign"`
	Name                 string `csv:"trip_short_name"`
	BlockID              string `csv:"block_id"`
	ShapeID              string `csv:"shape_id"`
	WheelchairAccessible int32  `csv:"wheelchair_accessible"`
	BikesAllowed         int32  `csv:"bikes_allowed"`
	DirectionID          bool   `csv:"direction_id"`
}

Jump to

Keyboard shortcuts

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