Documentation
¶
Index ¶
- type AgencyFields
- type AttributionFields
- type CalendarDatesFields
- type CalendarFields
- type ColOrders
- type CsvParser
- type ErrStats
- type FareAttributeFields
- type FareRuleFields
- type Feed
- func (feed *Feed) CleanTransfers()
- func (feed *Feed) DeleteAgency(id string)
- func (feed *Feed) DeleteFareAttribute(id string)
- func (feed *Feed) DeleteLevel(id string)
- func (feed *Feed) DeletePathway(id string)
- func (feed *Feed) DeleteRoute(id string)
- func (feed *Feed) DeleteService(id string)
- func (feed *Feed) DeleteShape(id string)
- func (feed *Feed) DeleteStop(id string)
- func (feed *Feed) DeleteTransfer(tk gtfs.TransferKey)
- func (feed *Feed) DeleteTrip(id string)
- func (feed *Feed) Parse(path string) error
- func (feed *Feed) PrefixParse(path string, prefix string) error
- func (feed *Feed) SetParseOpts(opts ParseOptions)
- type FeedInfoFields
- type Fields
- type FrequencyFields
- type HeaderIdx
- type LevelFields
- type ParseError
- type ParseOptions
- type PathwayFields
- type Polygon
- type RouteFields
- type RouteNotFoundErr
- type ShapeFields
- type StopFields
- type StopNotFoundErr
- type StopTimeFields
- type TransferFields
- type TranslationFields
- type TripFields
- type TripNotFoundErr
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AgencyFields ¶
type AgencyFields struct {
// contains filtered or unexported fields
}
func (AgencyFields) FldName ¶
func (flds AgencyFields) FldName(idx int) (name string)
type AttributionFields ¶
type AttributionFields struct {
// contains filtered or unexported fields
}
func (AttributionFields) FldName ¶
func (flds AttributionFields) FldName(idx int) (name string)
type CalendarDatesFields ¶
type CalendarDatesFields struct {
// contains filtered or unexported fields
}
func (CalendarDatesFields) FldName ¶
func (flds CalendarDatesFields) FldName(idx int) (name string)
type CalendarFields ¶
type CalendarFields struct {
// contains filtered or unexported fields
}
func (CalendarFields) FldName ¶
func (flds CalendarFields) FldName(idx int) (name string)
type ColOrders ¶
type ColOrders struct {
Agencies []string
Stops []string
Routes []string
Trips []string
StopTimes []string
Frequencies []string
Calendar []string
CalendarDates []string
FareAttributes []string
FareAttributeRules []string
Shapes []string
Levels []string
Pathways []string
Transfers []string
FeedInfos []string
Attributions []string
}
Holds the original column ordering
type CsvParser ¶
type CsvParser struct {
Curline int
// contains filtered or unexported fields
}
CsvParser is a wrapper around csv.Reader
func NewCsvParser ¶
NewCsvParser creates a new CsvParser
func (*CsvParser) ParseCsvLine ¶
func (*CsvParser) ParseRecord ¶
ParseRecord reads a single line into a map
type ErrStats ¶
type ErrStats struct {
DroppedAgencies int
DroppedStops int
DroppedRoutes int
DroppedTrips int
DroppedStopTimes int
DroppedFrequencies int
DroppedServices int
DroppedFareAttributes int
DroppedFareAttributeRules int
DroppedAttributions int
DroppedShapes int
DroppedLevels int
DroppedPathways int
DroppedTransfers int
DroppedFeedInfos int
DroppedTranslations int
NumTranslations int
}
type FareAttributeFields ¶
type FareAttributeFields struct {
// contains filtered or unexported fields
}
func (FareAttributeFields) FldName ¶
func (flds FareAttributeFields) FldName(idx int) (name string)
type FareRuleFields ¶
type FareRuleFields struct {
// contains filtered or unexported fields
}
func (FareRuleFields) FldName ¶
func (flds FareRuleFields) FldName(idx int) (name string)
type Feed ¶
type Feed struct {
Agencies map[string]*gtfs.Agency
Stops map[string]*gtfs.Stop
Routes map[string]*gtfs.Route
Trips map[string]*gtfs.Trip
Services map[string]*gtfs.Service
FareAttributes map[string]*gtfs.FareAttribute
Shapes map[string]*gtfs.Shape
Levels map[string]*gtfs.Level
Pathways map[string]*gtfs.Pathway
Transfers map[gtfs.TransferKey]gtfs.TransferVal
FeedInfos []*gtfs.FeedInfo
StopsAddFlds map[string]map[string]string
AgenciesAddFlds map[string]map[string]string
RoutesAddFlds map[string]map[string]string
TripsAddFlds map[string]map[string]string
StopTimesAddFlds map[string]map[string]map[int]string
FrequenciesAddFlds map[string]map[string]map[*gtfs.Frequency]string
ShapesAddFlds map[string]map[string]map[int]string
FareRulesAddFlds map[string]map[string]map[*gtfs.FareAttributeRule]string
LevelsAddFlds map[string]map[string]string
PathwaysAddFlds map[string]map[string]string
FareAttributesAddFlds map[string]map[string]string
TransfersAddFlds map[string]map[gtfs.TransferKey]string
FeedInfosAddFlds map[string]map[*gtfs.FeedInfo]string
AttributionsAddFlds map[string]map[*gtfs.Attribution]string
TranslationsAddFlds map[string]map[*gtfs.Translation]string
// this only holds feed-wide attributions
Attributions []*gtfs.Attribution
ErrorStats ErrStats
NumShpPoints int
NumStopTimes int
ColOrders ColOrders
// contains filtered or unexported fields
}
Feed represents a single GTFS feed
func (*Feed) CleanTransfers ¶
func (feed *Feed) CleanTransfers()
func (*Feed) DeleteAgency ¶
func (*Feed) DeleteFareAttribute ¶
func (*Feed) DeleteLevel ¶
func (*Feed) DeletePathway ¶
func (*Feed) DeleteRoute ¶
func (*Feed) DeleteService ¶
func (*Feed) DeleteShape ¶
func (*Feed) DeleteStop ¶
func (*Feed) DeleteTransfer ¶
func (feed *Feed) DeleteTransfer(tk gtfs.TransferKey)
func (*Feed) DeleteTrip ¶
func (*Feed) PrefixParse ¶
Parse the GTFS data in the specified folder into the feed, use and id prefix
func (*Feed) SetParseOpts ¶
func (feed *Feed) SetParseOpts(opts ParseOptions)
SetParseOpts sets the ParseOptions for this feed
type FeedInfoFields ¶
type FeedInfoFields struct {
// contains filtered or unexported fields
}
func (FeedInfoFields) FldName ¶
func (flds FeedInfoFields) FldName(idx int) (name string)
type FrequencyFields ¶
type FrequencyFields struct {
// contains filtered or unexported fields
}
func (FrequencyFields) FldName ¶
func (flds FrequencyFields) FldName(idx int) (name string)
type LevelFields ¶
type LevelFields struct {
// contains filtered or unexported fields
}
func (LevelFields) FldName ¶
func (flds LevelFields) FldName(idx int) (name string)
type ParseError ¶
type ParseError struct {
// contains filtered or unexported fields
}
A ParseError indicates an error during parsing
func (ParseError) Error ¶
func (e ParseError) Error() string
type ParseOptions ¶
type ParseOptions struct {
UseDefValueOnError bool
DropErroneous bool
DryRun bool
CheckNullCoordinates bool
EmptyStringRepl string
ZipFix bool
ShowWarnings bool
DropShapes bool
KeepAddFlds bool
DateFilterStart gtfs.Date
DateFilterEnd gtfs.Date
PolygonFilter []Polygon
UseStandardRouteTypes bool
MOTFilter map[int16]bool
MOTFilterNeg map[int16]bool
AssumeCleanCsv bool
RemoveFillers bool
UseGoogleSupportedRouteTypes bool
DropSingleStopTrips bool
}
A ParseOptions object holds options for parsing a the feed
type PathwayFields ¶
type PathwayFields struct {
// contains filtered or unexported fields
}
func (PathwayFields) FldName ¶
func (flds PathwayFields) FldName(idx int) (name string)
type Polygon ¶
type Polygon struct {
OuterRing [][2]float64
InnerRings [][][2]float64
// contains filtered or unexported fields
}
func NewPolygon ¶
NewPolygon creates a new Polygon from an outer ring
type RouteFields ¶
type RouteFields struct {
// contains filtered or unexported fields
}
func (RouteFields) FldName ¶
func (flds RouteFields) FldName(idx int) (name string)
type RouteNotFoundErr ¶
type RouteNotFoundErr struct {
// contains filtered or unexported fields
}
func (*RouteNotFoundErr) Error ¶
func (e *RouteNotFoundErr) Error() string
func (*RouteNotFoundErr) PayloadId ¶
func (e *RouteNotFoundErr) PayloadId() string
func (*RouteNotFoundErr) RouteId ¶
func (e *RouteNotFoundErr) RouteId() string
type ShapeFields ¶
type ShapeFields struct {
// contains filtered or unexported fields
}
func (ShapeFields) FldName ¶
func (flds ShapeFields) FldName(idx int) (name string)
type StopFields ¶
type StopFields struct {
// contains filtered or unexported fields
}
func (StopFields) FldName ¶
func (flds StopFields) FldName(idx int) (name string)
type StopNotFoundErr ¶
type StopNotFoundErr struct {
// contains filtered or unexported fields
}
custom error types for later checking
func (*StopNotFoundErr) Error ¶
func (e *StopNotFoundErr) Error() string
func (*StopNotFoundErr) StopId ¶
func (e *StopNotFoundErr) StopId() string
type StopTimeFields ¶
type StopTimeFields struct {
// contains filtered or unexported fields
}
func (StopTimeFields) FldName ¶
func (flds StopTimeFields) FldName(idx int) (name string)
type TransferFields ¶
type TransferFields struct {
FromStopId int
ToStopId int
FromRouteId int
ToRouteId int
FromTripId int
ToTripId int
TransferType int
MinTransferTime int
}
func (TransferFields) FldName ¶
func (flds TransferFields) FldName(idx int) (name string)
type TranslationFields ¶
type TranslationFields struct {
// contains filtered or unexported fields
}
func (TranslationFields) FldName ¶
func (flds TranslationFields) FldName(idx int) (name string)
type TripFields ¶
type TripFields struct {
// contains filtered or unexported fields
}
func (TripFields) FldName ¶
func (flds TripFields) FldName(idx int) (name string)
type TripNotFoundErr ¶
type TripNotFoundErr struct {
// contains filtered or unexported fields
}
func (*TripNotFoundErr) Error ¶
func (e *TripNotFoundErr) Error() string
func (*TripNotFoundErr) TripId ¶
func (e *TripNotFoundErr) TripId() string
Click to show internal directories.
Click to hide internal directories.
