stream

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VertexVertexID   = iota
	VertexOrderPos   = iota
	VertexImportance = iota
	VertexGeom       = iota
)
View Source
const (
	EdgeFromVertexID         = iota
	EdgeToVertexID           = iota
	EdgeWeight               = iota
	EdgeGeom                 = iota
	EdgeWasOneWay            = iota
	EdgeEdgeID               = iota
	EdgeOsmWayFrom           = iota
	EdgeOsmWayTo             = iota
	EdgeOsmWayFromSourceNode = iota
	EdgeOsmWayFromTargetNode = iota
	EdgeOsmWayToSourceNode   = iota
	EdgeOsmWayToTargetNode   = iota
)
View Source
const (
	ShortcutFromVertexID = iota
	ShortcutToVertexID   = iota
	ShortcutWeight       = iota
	ShortcutViaVertexID  = iota
)

Variables

View Source
var EdgeFieldsOrder = []string{"from_vertex_id", "to_vertex_id", "weight", "geom", "was_one_way", "edge_id", "osm_way_from", "osm_way_to", "osm_way_from_source_node", "osm_way_from_target_node", "osm_way_to_source_node", "osm_way_to_target_node"}
View Source
var ShortcutFieldsOrder = []string{"from_vertex_id", "to_vertex_id", "weight", "via_vertex_id"}
View Source
var VertexFieldsOrder = []string{"vertex_id", "order_pos", "importance", "geom"}

Functions

func IterateEdges

func IterateEdges(fileName string, threadCount int, handler func(StringArr)) error

func IterateShortcuts

func IterateShortcuts(fileName string, threadCount int, handler func(StringArr)) error

func IterateVertices

func IterateVertices(fileName string, threadCount int, handler func(StringArr)) error

Types

type GTFSFile added in v1.0.2

type GTFSFile struct {
	Reader *zip.ReadCloser
}

func OpenGTFS added in v1.0.2

func OpenGTFS(path string) (*GTFSFile, error)

func (*GTFSFile) Close added in v1.0.2

func (g *GTFSFile) Close() error

func (*GTFSFile) CountRows added in v1.0.2

func (g *GTFSFile) CountRows(fileName string) (int, error)

func (*GTFSFile) Exists added in v1.0.3

func (g *GTFSFile) Exists(fileName string) bool

func (*GTFSFile) IterateCalendarDates added in v1.0.2

func (g *GTFSFile) IterateCalendarDates(handler func(int, *gtfs.CalendarDate) bool) error

func (*GTFSFile) IterateRoutes added in v1.0.2

func (g *GTFSFile) IterateRoutes(handler func(int, *gtfs.Route) bool) error

func (*GTFSFile) IterateServices added in v1.0.2

func (g *GTFSFile) IterateServices(handler func(int, *gtfs.Calendar) bool) error

func (*GTFSFile) IterateStopTimes added in v1.0.2

func (g *GTFSFile) IterateStopTimes(handler func(int, *gtfs.StopTime) bool) error

func (*GTFSFile) IterateStops added in v1.0.2

func (g *GTFSFile) IterateStops(handler func(int, *gtfs.Stop) bool) error

func (*GTFSFile) IterateTrips added in v1.0.2

func (g *GTFSFile) IterateTrips(handler func(int, *gtfs.Trip) bool) error

type StringArr

type StringArr []string

func (StringArr) GetFloat

func (v StringArr) GetFloat(index int) float64

func (StringArr) GetInt

func (v StringArr) GetInt(index int) int64

func (StringArr) GetString

func (v StringArr) GetString(index int) string

Jump to

Keyboard shortcuts

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