{"id":21228138,"url":"https://github.com/d-k-c/gtfsimporter","last_synced_at":"2025-06-22T05:33:57.355Z","repository":{"id":87607557,"uuid":"141312303","full_name":"d-k-c/gtfsimporter","owner":"d-k-c","description":"Tools to import and compare GTFS data with OSM","archived":false,"fork":false,"pushed_at":"2022-12-08T06:34:57.000Z","size":102,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-03T20:41:59.151Z","etag":null,"topics":["gtfs","import","osm","python3","stm"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/d-k-c.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2018-07-17T15:55:56.000Z","updated_at":"2020-04-20T02:19:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"c196eb1c-a1e5-46ff-bf40-b8ebe1d3e109","html_url":"https://github.com/d-k-c/gtfsimporter","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/d-k-c/gtfsimporter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d-k-c%2Fgtfsimporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d-k-c%2Fgtfsimporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d-k-c%2Fgtfsimporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d-k-c%2Fgtfsimporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/d-k-c","download_url":"https://codeload.github.com/d-k-c/gtfsimporter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d-k-c%2Fgtfsimporter/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261243140,"owners_count":23129585,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["gtfs","import","osm","python3","stm"],"created_at":"2024-11-20T23:09:04.873Z","updated_at":"2025-06-22T05:33:52.345Z","avatar_url":"https://github.com/d-k-c.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Extract Bus Routes from GTFS dataset\n\n\n## About this script\n\nPublic Transport Agencies provide data about bus routes, trips, and stops. Most\nof the bus routes are incomplete in Open Street Map, this script can help fill\nthe gaps by exporting missing stops and bus routes in JOSM compatible format.\nIn JOSM, stops and routes should be reviewed manually before being uploaded.\n\n## Set up\n\nA `pipenv` environment is provided. If you have `pipenv` available on your\nmachine, type `pipenv sync` to install required dependencies. Otherwise, you can\ninstall the dependencies yourself:\n- haversine: a convenient module to compute the distance between two GPS\n  coordinates\n- overpy: module used to fetch results with the Overpass API\n- requests: to query manually Overpass API and cache interesting data\n\nThe main entrypoint is gtfsimporter/main.py. Run `pipenvrun python -m\ngtfsimporter.main --help` to get a list of available commands.\n\n## Limitations\n\n- When parsing GTFS data, only the longest trip for each direction is kept.\n  Sometimes, shorter or different trips exist because some buses only run on a\n  part of the line, or stop at different places depending on the time of day.\n- When creating bus routes, this program expects bus stops to be already present\n  in OpenStreetMap. This is purely to limit the size of each change, to make\n  review easier.\n- Route relations created by this program don't contain ways.\n\n## Helper Makefile\n\nThe usual way to interact with this program is to use its main entrypoint:\nmain.py. But a Makefile is also provided to help interacting with known GTFS\ndata providers. For known providers, the Makefile will fetch GTFS archive, unzip\nit, and wrap gtfsimporter commands for convenience. For instance, the `STM\n(Société de Transport de Montréal` is a known provider, so you can just use\n`make stm-export-routes` and it will do everything for you. Use `make help` for\nmore info.\n\nThe first run can be quite long because GTFS data are fully parsed to generate\nstops and routes lists. Cache files are then generated to make following\ninvocations faster.\n\n## TL;DR\n\nHow do I setup this project?\n- `pipenv sync`\n\nI want to generate stops\n- `make stm-export-stops`\n\nI want to see the route for line 10 of the STM network, what should I do?\n- `make stm-export-route route=10 # result is in work/stm/route_10.osm`\n\nActually, I want all routes\n- `make stm-export-routes # result is in work/stm/routes.osm`\n\nSorry, I meant only *missing* routes\n- `make stm-export-routes-missing`\n\nRoute 10 has changed, what can I do?\n- `make stm-update-route route=10`\n\nI want to update my local version of OSM data\n- `make stm-clean-cache-osm # on following runs, cache will be re-generated`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd-k-c%2Fgtfsimporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fd-k-c%2Fgtfsimporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd-k-c%2Fgtfsimporter/lists"}