gtfs

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2025 License: GPL-3.0 Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Agency

type Agency struct {
	AgencyID       tt.String
	AgencyName     tt.String   `csv:",required"`
	AgencyURL      tt.Url      `csv:",required"`
	AgencyTimezone tt.Timezone `csv:",required"`
	AgencyLang     tt.Language
	AgencyPhone    tt.String
	AgencyFareURL  tt.Url
	AgencyEmail    tt.Email
	tt.BaseEntity
}

Agency agency.txt

func (*Agency) EntityID

func (ent *Agency) EntityID() string

EntityID returns the ID or AgencyID.

func (*Agency) EntityKey

func (ent *Agency) EntityKey() string

EntityKey returns the GTFS identifier.

func (*Agency) Filename

func (ent *Agency) Filename() string

Filename agency.txt

func (*Agency) TableName

func (ent *Agency) TableName() string

TableName gtfs_agencies

type Area

type Area struct {
	AreaID    tt.String `csv:",required"`
	AreaName  tt.String
	AgencyIDs tt.Strings `csv:"-" db:"agency_ids"` // interline ext
	Geometry  tt.Polygon `csv:"-"`                 // interline ext
	tt.BaseEntity
}

Area fare_areas.txt

func (*Area) EntityID

func (ent *Area) EntityID() string

func (*Area) EntityKey

func (ent *Area) EntityKey() string

func (*Area) Filename

func (ent *Area) Filename() string

func (*Area) TableName

func (ent *Area) TableName() string

type Attribution

type Attribution struct {
	OrganizationName tt.String `csv:",required"`
	AgencyID         tt.Key    `target:"agency.txt"`
	RouteID          tt.Key    `target:"routes.txt"`
	TripID           tt.Key    `target:"trips.txt"`
	IsProducer       tt.Int    `enum:"0,1"`
	IsOperator       tt.Int    `enum:"0,1"`
	IsAuthority      tt.Int    `enum:"0,1"`
	AttributionID    tt.String
	AttributionURL   tt.Url
	AttributionEmail tt.Email
	AttributionPhone tt.String
	tt.BaseEntity
}

func (*Attribution) ConditionalErrors

func (ent *Attribution) ConditionalErrors() (errs []error)

Errors for this Entity.

func (*Attribution) Filename

func (ent *Attribution) Filename() string

func (*Attribution) TableName

func (ent *Attribution) TableName() string

type Calendar

type Calendar struct {
	ServiceID     tt.String      `csv:",required"`
	Monday        tt.Int         `csv:",required" enum:"0,1"`
	Tuesday       tt.Int         `csv:",required" enum:"0,1"`
	Wednesday     tt.Int         `csv:",required" enum:"0,1"`
	Thursday      tt.Int         `csv:",required" enum:"0,1"`
	Friday        tt.Int         `csv:",required" enum:"0,1"`
	Saturday      tt.Int         `csv:",required" enum:"0,1"`
	Sunday        tt.Int         `csv:",required" enum:"0,1"`
	StartDate     tt.Date        `csv:",required"`
	EndDate       tt.Date        `csv:",required"`
	Generated     tt.Bool        `csv:"-" db:"generated"`
	CalendarDates []CalendarDate `csv:"-" db:"-"` // for validation
	tt.BaseEntity
}

Calendar calendar.txt

func (*Calendar) ConditionalErrors

func (ent *Calendar) ConditionalErrors() []error

Errors for this Entity.

func (*Calendar) EntityID

func (ent *Calendar) EntityID() string

EntityID returns the ID or ServiceID.

func (*Calendar) EntityKey

func (ent *Calendar) EntityKey() string

EntityKey returns the GTFS identifier.

func (*Calendar) Filename

func (ent *Calendar) Filename() string

Filename calendar.txt

func (*Calendar) TableName

func (ent *Calendar) TableName() string

TableName gtfs_calendars

type CalendarDate

type CalendarDate struct {
	ServiceID     tt.Key  `csv:",required" target:"calendar.txt"`
	Date          tt.Date `csv:",required"`
	ExceptionType tt.Int  `csv:",required" enum:"1,2"`
	tt.BaseEntity
}

CalendarDate calendar_dates.txt

func (*CalendarDate) Filename

func (ent *CalendarDate) Filename() string

Filename calendar_dates.txt

func (*CalendarDate) TableName

func (ent *CalendarDate) TableName() string

TableName gtfs_calendar_dates

type FareAttribute

type FareAttribute struct {
	FareID           tt.String   `csv:",required"`
	Price            tt.Float    `csv:",required" range:"0,"`
	CurrencyType     tt.Currency `csv:",required"`
	PaymentMethod    tt.Int      `csv:",required" enum:"0,1"`
	Transfers        tt.Int      `enum:"0,1,2"` // note! null is distinct from 0
	AgencyID         tt.Key      `target:"agency.txt"`
	TransferDuration tt.Int      `range:"0,"`
	tt.BaseEntity
}

FareAttribute fare_attributes.txt

func (*FareAttribute) EntityID

func (ent *FareAttribute) EntityID() string

EntityID returns the ID or FareID.

func (*FareAttribute) EntityKey

func (ent *FareAttribute) EntityKey() string

EntityKey returns the GTFS identifier.

func (*FareAttribute) Filename

func (ent *FareAttribute) Filename() string

Filename fare_attributes.txt

func (*FareAttribute) TableName

func (ent *FareAttribute) TableName() string

TableName gtfs_fare_attributes

type FareLegRule

type FareLegRule struct {
	LegGroupID           tt.String
	FromAreaID           tt.String `target:"areas.txt"`
	ToAreaID             tt.String `target:"areas.txt"`
	NetworkID            tt.String `target:"networks.txt"`
	FareProductID        tt.String `csv:",required" target:"fare_products.txt:fare_product_id"`
	FromTimeframeGroupID tt.String `target:"timeframes.txt:timeframe_group_id"`
	ToTimeframeGroupID   tt.String `target:"timeframes.txt:timeframe_group_id"`
	RulePriority         tt.Int    `range:"0,"`
	TransferOnly         tt.Int    `enum:"0,1"` // interline ext
	tt.BaseEntity
}

FareLegRule fare_leg_rules.txt

func (*FareLegRule) DuplicateKey added in v1.0.0

func (ent *FareLegRule) DuplicateKey() string

func (*FareLegRule) EntityID

func (ent *FareLegRule) EntityID() string

func (*FareLegRule) Filename

func (ent *FareLegRule) Filename() string

func (*FareLegRule) GroupKey added in v1.0.0

func (ent *FareLegRule) GroupKey() (string, string)

func (*FareLegRule) TableName

func (ent *FareLegRule) TableName() string

type FareMedia

type FareMedia struct {
	FareMediaID   tt.String `csv:",required"`
	FareMediaName tt.String `csv:",required"`
	FareMediaType tt.Int    `csv:",required" enum:"0,1,2,3,4"`
	tt.BaseEntity
}

FareMedia fare_media.txt

func (*FareMedia) EntityID

func (ent *FareMedia) EntityID() string

func (*FareMedia) EntityKey

func (ent *FareMedia) EntityKey() string

func (*FareMedia) Filename

func (ent *FareMedia) Filename() string

func (*FareMedia) TableName

func (ent *FareMedia) TableName() string

type FareProduct

type FareProduct struct {
	FareProductID   tt.String `csv:",required" `
	FareProductName tt.String
	Amount          tt.CurrencyAmount `csv:",required"`
	Currency        tt.Currency       `csv:",required"`
	DurationStart   tt.Int            `enum:"0,1"`                                      // proposed extension
	DurationAmount  tt.Float          `range:"0,"`                                      // proposed extension
	DurationUnit    tt.Int            `enum:"0,1,2,3,4,5,6"`                            // proposed extension
	DurationType    tt.Int            `enum:"1,2"`                                      // proposed extension
	RiderCategoryID tt.Key            `target:"rider_categories.txt:rider_category_id"` // proposed extension
	FareMediaID     tt.Key            `target:"fare_media.txt"`                         // proposed extension
	tt.BaseEntity
}

FareProduct fare_products.txt

func (*FareProduct) ConditionalErrors

func (ent *FareProduct) ConditionalErrors() (errs []error)

func (*FareProduct) DuplicateKey added in v1.0.0

func (ent *FareProduct) DuplicateKey() string

func (*FareProduct) EntityID

func (ent *FareProduct) EntityID() string

func (*FareProduct) Filename

func (ent *FareProduct) Filename() string

func (*FareProduct) GetValue

func (ent *FareProduct) GetValue(key string) (any, bool)

func (*FareProduct) GroupKey added in v1.0.0

func (ent *FareProduct) GroupKey() (string, string)

func (*FareProduct) TableName

func (ent *FareProduct) TableName() string

type FareRule

type FareRule struct {
	FareID        tt.String `csv:",required" target:"fare_attributes.txt"`
	RouteID       tt.Key    `target:"routes.txt"`
	OriginID      tt.String
	DestinationID tt.String
	ContainsID    tt.String
	tt.BaseEntity
}

FareRule fare_rules.txt

func (*FareRule) DuplicateKey added in v1.0.0

func (ent *FareRule) DuplicateKey() string

func (*FareRule) Filename

func (ent *FareRule) Filename() string

Filename fare_rules.txt

func (*FareRule) TableName

func (ent *FareRule) TableName() string

TableName gtfs_fare_Rules

type FareTransferRule

type FareTransferRule struct {
	FromLegGroupID      tt.String `target:"fare_leg_rules.txt:leg_group_id"`
	ToLegGroupID        tt.String `target:"fare_leg_rules.txt:leg_group_id"`
	TransferCount       tt.Int    `range:"-1,"`
	DurationLimit       tt.Int    `range:"0,"`
	DurationLimitType   tt.Int    `enum:"0,1,2,3"`
	FareTransferType    tt.Int    `csv:",required" enum:"0,1,2"`
	FareProductID       tt.String `target:"fare_products.txt:fare_product_id"`
	FilterFareProductID tt.String `target:"fare_products.txt:fare_product_id"` // proposed extension
	tt.BaseEntity
}

FareTransferRule fare_transfer_rules.txt

func (*FareTransferRule) ConditionalErrors

func (ent *FareTransferRule) ConditionalErrors() (errs []error)

func (*FareTransferRule) DuplicateKey added in v1.0.0

func (ent *FareTransferRule) DuplicateKey() string

func (*FareTransferRule) Filename

func (ent *FareTransferRule) Filename() string

func (*FareTransferRule) TableName

func (ent *FareTransferRule) TableName() string

type FeedInfo

type FeedInfo struct {
	FeedPublisherName tt.String   `csv:",required"`
	FeedPublisherURL  tt.Url      `csv:",required"`
	FeedLang          tt.Language `csv:",required"`
	FeedVersion       tt.String   `db:"feed_version_name"`
	FeedStartDate     tt.Date
	FeedEndDate       tt.Date
	DefaultLang       tt.Language
	FeedContactEmail  tt.Email
	FeedContactURL    tt.Url
	tt.BaseEntity
}

FeedInfo feed_info.txt

func (*FeedInfo) ConditionalErrors

func (ent *FeedInfo) ConditionalErrors() (errs []error)

Errors for this Entity.

func (*FeedInfo) Filename

func (ent *FeedInfo) Filename() string

Filename feed_info.txt

func (*FeedInfo) TableName

func (ent *FeedInfo) TableName() string

TableName gtfs_feed_infos

type Frequency

type Frequency struct {
	TripID      tt.String  `csv:",required" target:"trips.txt"`
	HeadwaySecs tt.Int     `csv:",required" range:"1,"`
	StartTime   tt.Seconds `csv:",required"`
	EndTime     tt.Seconds `csv:",required"`
	ExactTimes  tt.Int     `enum:"0,1"`
	tt.BaseEntity
}

Frequency frequencies.txt

func (*Frequency) ConditionalErrors

func (ent *Frequency) ConditionalErrors() (errs []error)

Errors for this Entity.

func (*Frequency) Filename

func (ent *Frequency) Filename() string

Filename frequencies.txt

func (*Frequency) RepeatCount

func (ent *Frequency) RepeatCount() int

RepeatCount returns the number of times this trip will be repeated.

func (*Frequency) TableName

func (ent *Frequency) TableName() string

TableName gtfs_frequencies

type Level

type Level struct {
	LevelID    tt.String `csv:",required"`
	LevelIndex tt.Float  `csv:",required"`
	LevelName  tt.String
	tt.BaseEntity
}

Level levels.txt

func (*Level) EntityID

func (ent *Level) EntityID() string

EntityID returns the ID or StopID.

func (*Level) EntityKey

func (ent *Level) EntityKey() string

EntityKey returns the GTFS identifier.

func (*Level) Filename

func (ent *Level) Filename() string

Filename levels.txt

func (*Level) TableName

func (ent *Level) TableName() string

TableName ext_pathways_levels

type Network added in v1.0.0

type Network struct {
	NetworkID   tt.String
	NetworkName tt.String
	tt.BaseEntity
}

func (*Network) EntityID added in v1.0.0

func (ent *Network) EntityID() string

func (*Network) EntityKey added in v1.0.0

func (ent *Network) EntityKey() string

func (*Network) Filename added in v1.0.0

func (ent *Network) Filename() string

func (*Network) TableName added in v1.0.0

func (ent *Network) TableName() string

type Pathway

type Pathway struct {
	PathwayID           tt.String `csv:",required"`
	FromStopID          tt.String `csv:",required" target:"stops.txt"`
	ToStopID            tt.String `csv:",required" target:"stops.txt"`
	PathwayMode         tt.Int    `csv:",required"`
	IsBidirectional     tt.Int    `csv:",required"`
	Length              tt.Float
	TraversalTime       tt.Int
	StairCount          tt.Int
	MaxSlope            tt.Float
	MinWidth            tt.Float
	SignpostedAs        tt.String
	ReverseSignpostedAs tt.String
	tt.BaseEntity
}

Pathway pathways.txt

func (*Pathway) EntityID

func (ent *Pathway) EntityID() string

EntityID returns the ID or StopID.

func (*Pathway) EntityKey

func (ent *Pathway) EntityKey() string

EntityKey returns the GTFS identifier.

func (*Pathway) Filename

func (ent *Pathway) Filename() string

Filename pathways.txt

func (*Pathway) TableName

func (ent *Pathway) TableName() string

TableName ext_pathway_pathways

type Reader added in v1.0.0

type Reader interface {
	Stops() chan Stop
	StopTimes() chan StopTime
	Agencies() chan Agency
	Calendars() chan Calendar
	CalendarDates() chan CalendarDate
	FareAttributes() chan FareAttribute
	FareRules() chan FareRule
	FeedInfos() chan FeedInfo
	Frequencies() chan Frequency
	Routes() chan Route
	Shapes() chan Shape
	Transfers() chan Transfer
	Pathways() chan Pathway
	Levels() chan Level
	Trips() chan Trip
	Translations() chan Translation
	Attributions() chan Attribution
	Areas() chan Area
	StopAreas() chan StopArea
	FareLegRules() chan FareLegRule
	FareTransferRules() chan FareTransferRule
	FareProducts() chan FareProduct
	RiderCategories() chan RiderCategory
	FareMedia() chan FareMedia
	Timeframes() chan Timeframe
	Networks() chan Network
	RouteNetworks() chan RouteNetwork
}

type RiderCategory

type RiderCategory struct {
	RiderCategoryID   tt.String `csv:",required"`
	RiderCategoryName tt.String `csv:",required"`
	MinAge            tt.Int    `range:"0,"`
	MaxAge            tt.Int    `range:"0,"`
	EligibilityURL    tt.Url
	tt.BaseEntity
}

RiderCategory rider_categories.txt

func (*RiderCategory) ConditionalErrors

func (ent *RiderCategory) ConditionalErrors() (errs []error)

func (*RiderCategory) Filename

func (ent *RiderCategory) Filename() string

func (*RiderCategory) GroupKey added in v1.0.0

func (ent *RiderCategory) GroupKey() (string, string)

func (*RiderCategory) TableName

func (ent *RiderCategory) TableName() string

type Route

type Route struct {
	RouteID           tt.String `csv:",required"`
	AgencyID          tt.Key    `target:"agency.txt"`
	RouteShortName    tt.String
	RouteLongName     tt.String
	RouteDesc         tt.String
	RouteType         tt.Int `csv:",required"`
	RouteURL          tt.Url
	RouteColor        tt.Color
	RouteTextColor    tt.Color
	RouteSortOrder    tt.Int `range:"0,"`
	ContinuousPickup  tt.Int `enum:"0,1,2,3"`
	ContinuousDropOff tt.Int `enum:"0,1,2,3"`
	NetworkID         tt.String
	AsRoute           tt.Int
	Geometry          tt.Geometry `csv:"-" db:"-"`
	tt.BaseEntity
}

Route routes.txt

func (*Route) ConditionalErrors

func (ent *Route) ConditionalErrors() []error

func (*Route) EntityID

func (ent *Route) EntityID() string

EntityID returns ID or RouteID.

func (*Route) EntityKey

func (ent *Route) EntityKey() string

EntityKey returns the GTFS identifier.

func (*Route) Filename

func (ent *Route) Filename() string

Filename routes.txt

func (*Route) GroupKey added in v1.0.0

func (ent *Route) GroupKey() (string, string)

func (*Route) TableName

func (ent *Route) TableName() string

TableName gtfs_routes

type RouteNetwork added in v1.0.0

type RouteNetwork struct {
	NetworkID tt.Key `target:"networks.txt"`
	RouteID   tt.Key `target:"routes.txt"`
	tt.BaseEntity
}

func (*RouteNetwork) DuplicateKey added in v1.0.0

func (ent *RouteNetwork) DuplicateKey() string

func (*RouteNetwork) Filename added in v1.0.0

func (ent *RouteNetwork) Filename() string

func (*RouteNetwork) TableName added in v1.0.0

func (ent *RouteNetwork) TableName() string

type Shape

type Shape struct {
	ShapeID           tt.String `csv:",required"`
	ShapePtLat        tt.Float  `db:"-" csv:",required" range:"-90,90"`
	ShapePtLon        tt.Float  `db:"-" csv:",required" range:"-180,180"`
	ShapePtSequence   tt.Int    `db:"-" csv:",required" range:"0,"`
	ShapeDistTraveled tt.Float  `db:"-" range:"0,"`
	tt.BaseEntity
}

Shape shapes.txt

func (*Shape) EntityID

func (ent *Shape) EntityID() string

EntityID returns the ID or ShapeID.

func (*Shape) EntityKey

func (ent *Shape) EntityKey() string

EntityKey returns the GTFS identifier.

func (*Shape) Errors

func (ent *Shape) Errors() (errs []error)

Errors for this Entity.

func (*Shape) Filename

func (ent *Shape) Filename() string

Filename shapes.txt

func (*Shape) SetString

func (ent *Shape) SetString(key string, value string) error

SetString provides a fast, non-reflect loading path.

type Stop

type Stop struct {
	StopID             tt.String `csv:",required" required:"true"`
	StopName           tt.String
	StopCode           tt.String
	StopDesc           tt.String
	StopLat            tt.Float `db:"-" range:"-90,90"` // csv load to Geometry
	StopLon            tt.Float `db:"-" range:"-180,180"`
	ZoneID             tt.String
	StopURL            tt.Url
	TtsStopName        tt.String
	PlatformCode       tt.String
	LocationType       tt.Int `enum:"0,1,2,3,4"`
	ParentStation      tt.Key `target:"stops.txt"`
	StopTimezone       tt.Timezone
	WheelchairBoarding tt.Int   `enum:"0,1,2"`
	LevelID            tt.Key   `target:"levels.txt"`
	Geometry           tt.Point `csv:"-" db:"geometry"`
	tt.BaseEntity
}

Stop stops.txt

func (*Stop) ConditionalErrors

func (ent *Stop) ConditionalErrors() []error

func (*Stop) Coordinates

func (ent *Stop) Coordinates() [2]float64

Coordinates returns the stop lon,lat as a [2]float64

func (*Stop) EntityID

func (ent *Stop) EntityID() string

EntityID returns the ID or StopID.

func (*Stop) EntityKey

func (ent *Stop) EntityKey() string

EntityKey returns the GTFS identifier.

func (*Stop) Filename

func (ent *Stop) Filename() string

Filename stops.txt

func (*Stop) SetCoordinates

func (ent *Stop) SetCoordinates(p [2]float64)

SetCoordinates takes a [2]float64 and sets the Stop's lon,lat

func (*Stop) TableName

func (ent *Stop) TableName() string

TableName gtfs_stops

func (*Stop) ToPoint

func (ent *Stop) ToPoint() tlxy.Point

type StopArea

type StopArea struct {
	AreaID tt.Key `csv:",required" target:"areas.txt"`
	StopID tt.Key `csv:",required" target:"stops.txt"`
	tt.BaseEntity
}

StopArea stop_areas.txt

func (*StopArea) Filename

func (ent *StopArea) Filename() string

func (*StopArea) TableName

func (ent *StopArea) TableName() string

type StopTime

type StopTime struct {
	TripID            tt.String `csv:",required" target:"trips.txt"`
	StopID            tt.String `csv:",required" target:"stops.txt"`
	StopSequence      tt.Int    `csv:",required"`
	StopHeadsign      tt.String
	ArrivalTime       tt.Seconds
	DepartureTime     tt.Seconds
	PickupType        tt.Int
	DropOffType       tt.Int
	ContinuousPickup  tt.Int
	ContinuousDropOff tt.Int
	ShapeDistTraveled tt.Float
	Timepoint         tt.Int
	Interpolated      tt.Int `csv:"-"` // interpolated times: 0 for provided, 1 interpolated // TODO: 1 for shape, 2 for straight-line
	tt.MinEntity
	tt.ErrorEntity
	tt.ExtraEntity
	tt.FeedVersionEntity
}

StopTime stop_times.txt

func (*StopTime) Errors

func (ent *StopTime) Errors() []error

Errors for this Entity.

func (*StopTime) Filename

func (ent *StopTime) Filename() string

Filename stop_times.txt

func (*StopTime) GetString

func (ent *StopTime) GetString(key string) (string, error)

GetString returns the string representation of an field.

func (*StopTime) SetString

func (ent *StopTime) SetString(key, value string) error

SetString provides a fast, non-reflect loading path.

func (*StopTime) TableName

func (ent *StopTime) TableName() string

TableName gtfs_stop_times

func (*StopTime) UpdateKeys

func (ent *StopTime) UpdateKeys(emap *tt.EntityMap) error

UpdateKeys updates Entity references.

type Timeframe added in v1.0.0

type Timeframe struct {
	TimeframeGroupID tt.String
	StartTime        tt.Seconds
	EndTime          tt.Seconds
	ServiceID        tt.Key `target:"calendar.txt"`
	tt.BaseEntity
}

func (*Timeframe) Filename added in v1.0.0

func (ent *Timeframe) Filename() string

func (*Timeframe) GroupKey added in v1.0.0

func (ent *Timeframe) GroupKey() (string, string)

func (*Timeframe) TableName added in v1.0.0

func (ent *Timeframe) TableName() string

type Transfer

type Transfer struct {
	FromStopID      tt.Key `target:"stops.txt"`
	ToStopID        tt.Key `target:"stops.txt"`
	FromRouteID     tt.Key `target:"routes.txt"`
	ToRouteID       tt.Key `target:"routes.txt"`
	FromTripID      tt.Key `target:"trips.txt"`
	ToTripID        tt.Key `target:"trips.txt"`
	TransferType    tt.Int `enum:"0,1,2,3,4,5"`
	MinTransferTime tt.Int `range:"0,"`
	tt.BaseEntity
}

Transfer transfers.txt

func (*Transfer) ConditionalErrors

func (ent *Transfer) ConditionalErrors() (errs []error)

Errors for this Entity.

func (*Transfer) Filename

func (ent *Transfer) Filename() string

Filename transfers.txt

func (*Transfer) TableName

func (ent *Transfer) TableName() string

TableName gtfs_transfers

type Translation

type Translation struct {
	// "TableNameValue" because TableName is a required interface method
	TableNameValue tt.String   `db:"table_name" csv:"table_name,required"`
	FieldName      tt.String   `csv:",required"`
	Language       tt.Language `csv:",required"`
	Translation    tt.String   `csv:",required"`
	RecordID       tt.String
	RecordSubID    tt.String
	FieldValue     tt.String
	tt.BaseEntity
}

func (*Translation) ConditionalErrors

func (ent *Translation) ConditionalErrors() (errs []error)

Errors for this Entity.

func (*Translation) Filename

func (ent *Translation) Filename() string

func (*Translation) TableName

func (ent *Translation) TableName() string

type Trip

type Trip struct {
	RouteID              tt.Key    `csv:",required" target:"routes.txt"`
	ServiceID            tt.Key    `csv:",required" target:"calendar.txt"`
	TripID               tt.String `csv:",required"`
	TripHeadsign         tt.String
	TripShortName        tt.String
	DirectionID          tt.Int `enum:"0,1"`
	BlockID              tt.String
	ShapeID              tt.Key     `target:"shapes.txt"`
	WheelchairAccessible tt.Int     `enum:"0,1,2"`
	BikesAllowed         tt.Int     `enum:"0,1,2"`
	JourneyPatternID     tt.String  `csv:"-"`
	JourneyPatternOffset tt.Int     `csv:"-"`
	StopPatternID        tt.Int     `csv:"-"`
	StopTimes            []StopTime `csv:"-" db:"-"` // for validation
	tt.BaseEntity
}

Trip trips.txt

func (*Trip) EntityID

func (ent *Trip) EntityID() string

EntityID returns the ID or TripID.

func (*Trip) EntityKey

func (ent *Trip) EntityKey() string

EntityKey returns the GTFS identifier.

func (*Trip) Filename

func (ent *Trip) Filename() string

Filename trips.txt

func (*Trip) TableName

func (ent *Trip) TableName() string

TableName gtfs_trips

Jump to

Keyboard shortcuts

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