Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NoStopArea ¶
func NoStopArea(p *Parser)
Types ¶
type Parser ¶
Parser is the struct that contains all the options and data to parse OSM PBF files.
func NewParser ¶
func NewParser(file string, opts ...ParserOption) (*Parser, error)
NewParser creates a new custom parser.
Use self referential functions design to configure. See more: https://commandcenter.blogspot.com/2014/01/self-referential-functions-and-design.html
func (*Parser) Extract ¶
func (p *Parser) Extract(transit chan TransitData)
Extract parses OSM data and extracts transit data
func (*Parser) TransitData ¶
func (p *Parser) TransitData() []TransitData
Parse returns transit data in a slice from an OSM pbf file
type ParserOption ¶
type ParserOption func(*Parser)
ParserOption is a function that sets a certain config on a Parser.
This is part of the self referential functions design. See more: https://commandcenter.blogspot.com/2014/01/self-referential-functions-and-design.html
type Stop ¶
type Stop gtfs.StopSerializable
func StopFromNode ¶
func (Stop) Type ¶
func (s Stop) Type() TransitDataType
type StopArea ¶
func StopAreaFromNode ¶
func (StopArea) Type ¶
func (s StopArea) Type() TransitDataType
type TransitData ¶
type TransitData interface {
Type() TransitDataType
}
type TransitDataType ¶
type TransitDataType int
const ( StopType TransitDataType = iota StopAreaType )
type TransitFeed ¶
type TransitFeed gtfs.FeedSerializable
Click to show internal directories.
Click to hide internal directories.