{"id":13573078,"url":"https://github.com/mfdz/gtfs-hub","last_synced_at":"2025-04-04T11:31:19.330Z","repository":{"id":42019091,"uuid":"247836795","full_name":"mfdz/gtfs-hub","owner":"mfdz","description":"Collecting, shape-enhancing, validating, fixing and (partially) merging GTFS feeds","archived":false,"fork":false,"pushed_at":"2025-03-13T18:41:14.000Z","size":228,"stargazers_count":30,"open_issues_count":7,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-13T19:41:01.894Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Makefile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mfdz.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":"2020-03-16T23:30:18.000Z","updated_at":"2025-03-13T18:41:18.000Z","dependencies_parsed_at":"2024-01-09T10:40:02.587Z","dependency_job_id":"75e815a6-ef92-4516-8b8f-c5fa6cc587ec","html_url":"https://github.com/mfdz/gtfs-hub","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mfdz%2Fgtfs-hub","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mfdz%2Fgtfs-hub/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mfdz%2Fgtfs-hub/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mfdz%2Fgtfs-hub/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mfdz","download_url":"https://codeload.github.com/mfdz/gtfs-hub/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247170212,"owners_count":20895439,"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":[],"created_at":"2024-08-01T15:00:29.015Z","updated_at":"2025-04-04T11:31:14.321Z","avatar_url":"https://github.com/mfdz.png","language":"Makefile","funding_links":[],"categories":["Uncategorized","Sharing Data"],"sub_categories":["Uncategorized","Software for Creating APIs"],"readme":"# GTFS-Hub\n\nThis project aims at providing community tested, probably quality/content enhanced, partially merged or filtered GTFS-feeds of (currently German) transport agencies.\n\n\n## Motivation\nSince April, 1st, 2020, DELFI e.V. provides a (75%) Germany wide GTFS feed. However, for some use cases only a regional subset is needed, or locally published feeds need to be merged to retain original trip_ids to match e.g. GTFS-RT feeds.\n\nAdditionally, the locally published datasets as well as the Germany-wide DELFI GTFS feed sometimes have quality issues or miss e.g. shape information.\n\nWhile we hope, that all these problems are overcome soon, we currently still see a need to postprocess published data to overcome these shortcomings.\n\n## Inner workings\n\n### Updating, checking, enhancing GTFS\nGTFS-Hub regularly checks on a list of well known GTFS-feeds for updates.\n\nIf they have been updated, they get\n\n* downloaded, \n* quality checked via mecatran's [GTFSVTOR feedvalidator](https://gtfsvtor.mecatran.com/utw-test/web/pub/gtfsvtor)\n* optionally enhanced with shapes using OSM data and the [pfaedle tool](https://github.com/ad-freiburg/pfaedle)\n* optionally transformed with the [OneBusAway GTFS transformer tool](http://developer.onebusaway.org/modules/onebusaway-gtfs-modules/1.3.4-SNAPSHOT/onebusaway-gtfs-transformer-cli.html) (fed with a feed specific [rule file](https://github.com/OneBusAway/onebusaway-gtfs-modules/blob/15525f709ab75e50d79cb5c1b5fb23154f85d65e/src/site/apt/onebusaway-gtfs-transformer-cli.apt.vm#L52-L486))\n* and optionally merged into larger aggregated GTFS feeds or filtered to a regional subset\n\n### Updating and preparing OSM data\nBefore GFTS data is updated, the OSM data which is used to generate GFTFS shapes is updated.\nTo avoid daily downloading large pbf datasets (GTFS-Hub uses DACH (Germany, Austria, Switzerland) and Alsace (France)) \nfrom scratch, we only download the original datasets once and update these afterwards via [`pyosmium-up-to-date`](https://docs.osmcode.org/pyosmium/latest/tools_uptodate.html) and prepares some \nregion clipped extracts (namely Baden-Wuerttemberg including a buffer of some kilometers around the border).\n\nAs this extract will serve as input to [OpenTripPlanner](https://www.opentripplanner.org) as well, we do some additionally data processing on it to enhance some infos, e.g.\n\n* For parkings close to stations with no `park_ride` tag yet, set `park_ride=yes`.\n* Set some well-known parkings to [`park_ride=hov`](https://wiki.openstreetmap.org/wiki/Proposed_features/Tag:park_ride%3Dhov).\n\n### Publishing\nAfter updating OSM and GTFS data, you'll find the datasets in the folder `data/www`, ready to publish e.g. via a web serve serving this directory.\n\n### External references\nThis project uses a couple of other Docker images:\n\n* [adfreiburg/pfaedle](https://hub.docker.com/r/adfreiburg/pfaedle): a dockerized version of Patrick Brosi's tool pfaedle the enhance GTFS feeds by shapes map matched using OSM data\n* [mfdz/pyosmium](https://hub.docker.com/r/mfdz/pyosmium): a dockerized version of (py)osmium to quickly update / cut / merge OSM data\n* [mfdz/osmosis](https://hub.docker.com/r/mfdz/osmosis): a dockerized version of osmosis to enhance OSM data with a declarative instruction set\n* [mfdz/transitfeed](https://hub.docker.com/r/mfdz/gtfsvtor): a dockerized version of mecatran's [GTFSVTOR feedvalidator](https://gtfsvtor.mecatran.com/utw-test/web/pub/gtfsvtor).\n* [mfdz/otp-data-tools](https://hub.docker.com/r/mfdz/otp-data-tools): a dockerized version of onebusaway's GTFS transform and merge tools\n\nThanks to everybody contributing to these tools, the OSM community and Geofabrik and the transit agencies providing the data download services.\n\n## How to start gtfs-hub\n\n### Prerequisites\n\nYou'll need to have Docker installed.\n\nAlso, make sure you're using the *GNU* flavor of `make`. The BSD `make` (e.g. on macOS) is not fully compatible with this project.\n\n### Running GTFS-Hub\n\nAll configuration files necessary for the aforementioned processing steps reside in the `config` directory. The data will be downloaded into and processing within `data`.\n\n```sh\nmake all\n```\n\n### Running GTFS-Hub within a Docker container\n\n[GTFS-Hub's Makefile](makefile) is designed to work both *directly* on your machine, as well as within a Docker container. This section describes the 2nd setup.\n\nWe'll mount the `config` \u0026 `data` directories into the GTFS-hub container.\n\nNote that, because the [Makefile](makefile) will run the processing tools via `docker run`, we'll have to enable a Docker-in-Docker setup by\n- mounting `/var/run/docker.sock` to give the GTFS-Hub container the ability to create new containers\n- passing in the path of the *host* (your machine) GTFS-Hub directory as a `$HOST_MOUNT` environment variable\n\n```sh\ndocker run -it --rm \\\n\t-v $PWD/config:/gtfs-hub/config:ro -v $PWD/data:/gtfs-hub/data:rw \\\n\t-v /var/run/docker.sock:/var/run/docker.sock -e HOST_MOUNT=$PWD \\\n\tmfdz/gtfs-hub\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmfdz%2Fgtfs-hub","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmfdz%2Fgtfs-hub","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmfdz%2Fgtfs-hub/lists"}