{"id":44435030,"url":"https://github.com/vector-hector/bifrost","last_synced_at":"2026-02-12T13:53:40.958Z","repository":{"id":210990434,"uuid":"726563790","full_name":"Vector-Hector/bifrost","owner":"Vector-Hector","description":"A fast multi-modal routing engine","archived":false,"fork":false,"pushed_at":"2024-04-30T08:46:12.000Z","size":119,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-09T21:44:27.470Z","etag":null,"topics":["go","golang","gtfs","mobility","open-street-map","public-transport","trip-planner"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Vector-Hector.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-12-02T18:27:24.000Z","updated_at":"2025-07-13T10:36:53.000Z","dependencies_parsed_at":"2023-12-20T21:01:29.738Z","dependency_job_id":"7d5badd1-3bdc-434f-aa6e-1db8a0f0b84f","html_url":"https://github.com/Vector-Hector/bifrost","commit_stats":{"total_commits":47,"total_committers":2,"mean_commits":23.5,"dds":0.1063829787234043,"last_synced_commit":"e5aea0ec2e415f21af18d01bf0b2a1971a118867"},"previous_names":["vector-hector/bifrost"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/Vector-Hector/bifrost","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vector-Hector%2Fbifrost","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vector-Hector%2Fbifrost/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vector-Hector%2Fbifrost/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vector-Hector%2Fbifrost/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Vector-Hector","download_url":"https://codeload.github.com/Vector-Hector/bifrost/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vector-Hector%2Fbifrost/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29367645,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-12T08:51:36.827Z","status":"ssl_error","status_checked_at":"2026-02-12T08:51:26.849Z","response_time":55,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["go","golang","gtfs","mobility","open-street-map","public-transport","trip-planner"],"created_at":"2026-02-12T13:53:39.324Z","updated_at":"2026-02-12T13:53:40.949Z","avatar_url":"https://github.com/Vector-Hector.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bifrost\n\nA lightweight, blazing fast, multi-modal routing engine in go. It can route on public transport and streets. Its\nfeatures are still\nlimited compared to other routing engines, but it is already quite fast and easy to use.\n\n## Usage\n\nYou can use it either as a library or as a command line tool. The cli will start a server that you can query with\nhttp requests.\nYou will need to prepare a GTFS and an OSM file. We use the [golang binding](https://github.com/Vector-Hector/fptf) of\nthe [friendly public transport format](https://github.com/public-transport/friendly-public-transport-format/blob/1.2.1/spec/readme.md)\nfor journey input and output.\n\nNote, that internally, one of the libraries uses CGO for faster parsing. This can be turned off by setting the\nenvironment variable `CGO_ENABLED=0` before building.\n\n### CLI Usage\n\nPlease prepare at least one GTFS and one OSM file. After that, run:\n\n```bash\ngo run server/main.go -gtfs data/mvv/gtfs.zip -osm data/mvv/osm/oberbayern-latest.osm.pbf -bifrost data/mvv/munich.bifrost\n```\n\nThis will start a server on port 8090. You can query it with http requests. See [here](server/api.json) for the api\nspecification.\n\n### Library Usage\n\n```bash\ngo get github.com/Vector-Hector/bifrost\n```\n\nExample script:\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"github.com/Vector-Hector/bifrost\"\n\t\"github.com/Vector-Hector/fptf\"\n\t\"time\"\n)\n\nfunc main() {\n\tb := bifrost.DefaultBifrost // Create a new router with default parameters\n\terr := b.LoadData(\u0026bifrost.LoadOptions{\n\t\tOsmPaths:    []string{\"oberbayern-latest.osm.pbf\"},\n\t\tGtfsPaths:   []string{\"gtfs/\"},\n\t\tBifrostPath: \"munich.bifrost\",\n\t}) // Load cached data or create and cache routing data from source\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tr := b.NewRounds() // Reusable rounds object for routing\n\n\t// define origin, destination and time\n\torigin := \u0026fptf.Location{\n\t\tName:      \"München Hbf\",\n\t\tLongitude: 11.5596949,\n\t\tLatitude:  48.140262,\n\t}\n\n\tdest := \u0026fptf.Location{\n\t\tName:      \"Marienplatz\",\n\t\tLongitude: 11.5757167,\n\t\tLatitude:  48.1378071,\n\t}\n\n\tdepartureTime, err := time.Parse(time.RFC3339, \"2023-12-12T08:30:00Z\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tjourney, err := b.Route(r, []bifrost.SourceLocation{{\n\t\tLocation:  origin,\n\t\tDeparture: departureTime,\n\t}}, dest, false, false)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Println(\"Journey from\", journey.GetOrigin().GetName(), \"to\", journey.GetDestination().GetName(), \"departs at\", journey.GetDeparture(), \"and arrives at\", journey.GetArrival())\n}\n```\n\n## How it works internally\n\nThe routing algorithm is based on dijkstra and the RAPTOR algorithm. It switches each round between public transport\nand street routing to find the best multi-modal path.\n\n## References\n\nThanks to all the people who wrote the following articles, algorithms and libraries:\n\n- [OpenTripPlanner](https://github.com/opentripplanner/OpenTripPlanner): Great routing engine that inspired us to write\n  this. It has much more features, but also needs much more resources.\n- [Raptor Agorithm Paper](https://www.microsoft.com/en-us/research/wp-content/uploads/2012/01/raptor_alenex.pdf): The\n  paper that describes the RAPTOR algorithm\n- [Simple version of RAPTOR in python](https://kuanbutts.com/2020/09/12/raptor-simple-example/): Helped us understand\n  the algorithm and implement it\n- [Dijkstra](https://en.wikipedia.org/wiki/Dijkstra%27s_algorithm): For street routing\n- [GTFS](https://developers.google.com/transit/gtfs/reference): For public transport data\n- [OSM](https://www.openstreetmap.org/): For street data\n- [osm2ch](https://github.com/LdDl/osm2ch): For converting OSM to a street graph\n- [kdtree](https://github.com/kyroy/kdtree): For efficient nearest neighbour search\n- [fptf](https://github.com/public-transport/friendly-public-transport-format/blob/1.2.1/spec/readme.md): For input and output of the routing API\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvector-hector%2Fbifrost","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvector-hector%2Fbifrost","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvector-hector%2Fbifrost/lists"}