{"id":19788840,"url":"https://github.com/adrianprelipcean/pgtfs","last_synced_at":"2025-10-29T09:09:51.905Z","repository":{"id":234169399,"uuid":"785103499","full_name":"adrianprelipcean/pgtfs","owner":"adrianprelipcean","description":"PostgreSQL Extension for public transportation routing using GTFS","archived":false,"fork":false,"pushed_at":"2024-04-19T11:59:41.000Z","size":35,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-04-20T11:49:14.678Z","etag":null,"topics":["geospatial","gtfs","postgresql-extension","public-transportation","routing"],"latest_commit_sha":null,"homepage":"","language":"C++","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/adrianprelipcean.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSES/CC-BY-NC-SA-4.0.txt","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}},"created_at":"2024-04-11T07:49:36.000Z","updated_at":"2024-04-23T11:46:53.109Z","dependencies_parsed_at":"2024-04-23T11:46:50.075Z","dependency_job_id":null,"html_url":"https://github.com/adrianprelipcean/pgtfs","commit_stats":null,"previous_names":["adrianprelipcean/pgtfs"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adrianprelipcean%2Fpgtfs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adrianprelipcean%2Fpgtfs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adrianprelipcean%2Fpgtfs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adrianprelipcean%2Fpgtfs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adrianprelipcean","download_url":"https://codeload.github.com/adrianprelipcean/pgtfs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adrianprelipcean%2Fpgtfs/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259207842,"owners_count":22821777,"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":["geospatial","gtfs","postgresql-extension","public-transportation","routing"],"created_at":"2024-11-12T06:28:58.508Z","updated_at":"2025-10-29T09:09:51.801Z","avatar_url":"https://github.com/adrianprelipcean.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!--\nSPDX-FileCopyrightText: 2024 Adrian C. Prelipcean \u003cadrianprelipceanc@gmail.com\u003e\n\nSPDX-License-Identifier: CC-BY-NC-SA-4.0\n--\u003e\n\n# PGTFS\n\nPGTFS is a PostgreSQL extension designed to facilitate routing on top of the GTFS (General Transit Feed Specification) format. It provides functionality to query and analyze public transportation data stored in a PostgreSQL database using GTFS feeds.\n\n## Features\n\n- Perform routing and journey planning using the Connection Scan Algorithm (CSA).\n- Easily integrate public transportation data into your PostgreSQL-based applications.\n- Similar interface to pgRouting. \n\n\u003e Note: This is still a work in progress, and is not ready for production at this stage.\n\n\n## Documentation and tutorials\n\nOfficial documentation is available at [https://adrianprelipcean.github.io/pgtfs/](https://adrianprelipcean.github.io/pgtfs/)\n\nTutorials are available at [https://github.com/adrianprelipcean/pgtfs-tutorials](https://github.com/adrianprelipcean/pgtfs-tutorials)\n\n## Installation\n\n### On your local environment\n\n1. Clone the PGTFS repository:\n\n    ```sh\n    git clone https://github.com/adrianprelipcean/pgtfs.git\n    ```\n\n2. Install the server development packages (e.g., for Ubuntu):\n\n    ```sh\n    apt-get install postgresql-server-dev-all\n    ```\n\n3. Build and install the extension:\n\n    ```sh\n    cd pgtfs\n    make \u0026\u0026 make install\n    ```\n\n4. Enable the extension in your PostgreSQL database:\n\n    ```sql\n    CREATE EXTENSION pgtfs;\n    ```\n\n### Using Docker\n\n1. Build the Docker container\n\n    ```sh\n    docker build -t gtfs/db:1.0 . \n    ```\n\n2. Run the image \n\n    ```sh\n    docker run --name gtfs-container -d -p 15432:5432 --env-file=.env -v `pwd`/docs:/docs gtfs/db:1.0\n    ```\n\n3. Enable the extension \n    ```sh\n    psql --host localhost --port 15432 --user postgres -c \"CREATE EXTENSION pgtfs;\"\n    ```\n\n4. Verify that the extension is enabled \n    ```sh\n    psql --host localhost --port 15432 --user postgres -c \"SELECT * FROM pgtfs_version();\"\n    ```\n## Generating the documentation\nEasiest way to generate the documentation is to use Docker\n\n```sh\ndocker exec -it gtfs-container bash -c \"doxygen Doxygen \u0026\u0026 sphinx-build docs/ docs/_build/ -a\"\n```\n\n## Important notes \n\nThere are a couple drawbacks for the CSA implementation, in particular: \n- routing is performed exclusively on trips, so information such as footpaths is not considered \n- the SQL query that retrieves the information from `stop_times` **needs to be ordered**\n- CSA is an earliest arrival time algorithm, which means it does not prioritize same trip routes  \n- it is still a work in progress, and not production ready\n\n## License \n\nLicense information is found in the [LICENSES](./LICENSES/) folder. ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadrianprelipcean%2Fpgtfs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadrianprelipcean%2Fpgtfs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadrianprelipcean%2Fpgtfs/lists"}