{"id":20710871,"url":"https://github.com/entur/netex-gtfs-converter-java","last_synced_at":"2025-04-23T06:18:49.310Z","repository":{"id":37835294,"uuid":"417529939","full_name":"entur/netex-gtfs-converter-java","owner":"entur","description":"Convert a NeTEx dataset into a GTFS dataset","archived":false,"fork":false,"pushed_at":"2025-04-14T10:02:11.000Z","size":24853,"stargazers_count":7,"open_issues_count":6,"forks_count":5,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-04-23T06:18:41.848Z","etag":null,"topics":["ror"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"eupl-1.2","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/entur.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.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,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-10-15T14:30:45.000Z","updated_at":"2025-04-14T10:02:15.000Z","dependencies_parsed_at":"2023-10-16T16:48:11.690Z","dependency_job_id":"7b80634a-d14b-4fa9-8b84-6c757e7af9b7","html_url":"https://github.com/entur/netex-gtfs-converter-java","commit_stats":null,"previous_names":[],"tags_count":126,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/entur%2Fnetex-gtfs-converter-java","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/entur%2Fnetex-gtfs-converter-java/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/entur%2Fnetex-gtfs-converter-java/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/entur%2Fnetex-gtfs-converter-java/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/entur","download_url":"https://codeload.github.com/entur/netex-gtfs-converter-java/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250379809,"owners_count":21420841,"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":["ror"],"created_at":"2024-11-17T02:13:24.468Z","updated_at":"2025-04-23T06:18:49.288Z","avatar_url":"https://github.com/entur.png","language":"Java","funding_links":[],"categories":["Producing Data"],"sub_categories":["GTFS"],"readme":"\n# NeTEx-to-GTFS Converter Java\n\n[![CircleCI](https://circleci.com/gh/entur/netex-gtfs-converter-java/tree/main.svg?style=svg)](https://circleci.com/gh/entur/netex-gtfs-converter-java/tree/main)\n\nConverts NeTEX datasets into GTFS datasets.\nThe input NeTEx datasets are required to follow the [Nordic NeTEx Profile](https://enturas.atlassian.net/wiki/spaces/PUBLIC/pages/728891481/Nordic+NeTEx+Profile).\n\n# Input data\nThe converter requires:\n- The NeTEx codespace of the timetable data provider.\n- A NeTEx dataset containing the timetable data.\n- A NeTEx dataset containing the full definition of the StopPlaces and Quays referred from the timetable data. \n\n# Output\nThe converter produces a GTFS zip archive containing timetable data.\n\n# Data format prerequisites\nThe library supports out-of-the-box NeTEx datasets that follow the Nordic NeTEx Profile and assumes that the dataset structure and completeness are compatible with the Nordic NeTEx Profile (example: required name on a Line, required DestinationDisplay on the first stop of a JourneyPattern, ...).\nSupporting other NeTEx profiles is possible by overriding the default conversion process (see Extension points below).\n\n# Usage\n\n        InputStream stopsAndQuaysDataset = // input stream pointing to a zip archive containing the NeTEX stops and quays definitions.\n        DefaultStopAreaRepository defaultStopAreaRepository = new DefaultStopAreaRepository();\n        defaultStopAreaRepository.loadStopAreas(stopsAndQuaysDataset);\n\n        InputStream netexTimetableDataset = // input stream pointing to a zip archive containing the NeTEX timetable data.\n        String codespace = // NeTEX codespace for the timetable data provider.\n\n        GtfsExporter gtfsExport = new DefaultGtfsExporter(codespace, defaultStopAreaRepository);\n\n        // the returned Inputstream points to a GTFS zip archive\n        InputStream exportedGtfs = gtfsExport.convertTimetablesToGtfs(netexTimetableDataset);\n\n\n# Extension points\nGTFS entities are created by Producers interfaces (AgencyProducer, TripProducer, ...)\nThe library contains default implementations for these interfaces. They can be overridden in order to customize the conversion process.\nThe NetexDatasetLoader interface specifies the way NeTEx data is loaded into memory. The default implementation can also be overridden.\nExample:\n\n    public class EnturGtfsExporter extends DefaultGtfsExporter {\n        public EnturGtfsExporter(String codespace, StopAreaRepository stopAreaRepository) {\n            super(codespace, stopAreaRepository);\n            setNetexDatasetLoader(new EnturNetexDatasetLoader());\n            setAgencyProducer(new EnturAgencyProducer(getNetexDatasetRepository(), codespace));\n            setFeedInfoProducer(new EnturFeedInfoProducer());\n    }\n\n    GtfsExporter gtfsExport = new EnturGtfsExporter(codespace, defaultStopAreaRepository);\n}\n\n# Route Type Mapping\n\nThe table below contains the mapping between NeTEx transport modes/submodes and GTFS route types.  \nThis mapping is a combination of:\n- [The official GTFS extended route types](https://developers.google.com/transit/gtfs/reference/extended-route-types)\n- [A proposal to use TPEG-PTI types](https://groups.google.com/g/gtfs-changes/c/keT5rTPS7Y0/m/71uMz2l6ke0J)\n\nPlease note that NeTEx allows for overriding transport modes/submodes at the ServiceJourney level, while GTFS allows only one route type per route.  \nIn case a NeTEx line makes use of multiple transport modes/submodes, only the transport mode/submode defined at the Line level is used in the conversion process.  \n\n| NeTEx mode |        NeTEx submode        |                  GTFS route type name | GTFS route type code |\n|------------|:---------------------------:|--------------------------------------:|----------------------|\n| air        |                             |                           AIR_SERVICE | 1100                 | \n| air        |       domesticFlight        |                  DOMESTIC_AIR_SERVICE | 1102                 | \n| air        |      helicopterService      |                HELICOPTER_AIR_SERVICE | 1110                 | \n| air        |     internationalFlight     |             INTERNATIONAL_AIR_SERVICE | 1101                 | \n| bus        |                             |                           BUS_SERVICE | 700                  | \n| bus        |       airportLinkBus        |                           BUS_SERVICE | 700                  | \n| bus        |         expressBus          |                   EXPRESS_BUS_SERVICE | 702                  | \n| bus        |          localBus           |                     LOCAL_BUS_SERVICE | 704                  | \n| bus        |          nightBus           |                     NIGHT_BUS_SERVICE | 705                  | \n| bus        |     railReplacementBus      |          RAIL_REPLACEMENT_BUS_SERVICE | 714                  | \n| bus        |         regionalBus         |                  REGIONAL_BUS_SERVICE | 701                  | \n| bus        |          schoolBus          |                            SCHOOL_BUS | 712                  | \n| bus        |         shuttleBus          |                           SHUTTLE_BUS | 711                  | \n| bus        |       sightseeingBus        |                       SIGHTSEEING_BUS | 710                  | \n| cableway   |                             |                     TELECABIN_SERVICE | 1300                 | \n| coach      |                             |                         COACH_SERVICE | 200                  | \n| coach      |     internationalCoach      |           INTERNATIONAL_COACH_SERVICE | 201                  | \n| coach      |        nationalCoach        |                NATIONAL_COACH_SERVICE | 202                  | \n| coach      |        touristCoach         |                 TOURIST_COACH_SERVICE | 207                  | \n| ferry      |                             |                         FERRY_SERVICE | 1200                 | \n| funicular  |                             |                     FUNICULAR_SERVICE | 1400                 | \n| lift       |                             |                     TELECABIN_SERVICE | 1300                 | \n| metro      |                             |                         METRO_SERVICE | 401                  | \n| other      |                             |                 MISCELLANEOUS_SERVICE | 1700                 | \n| rail       |                             |                       RAILWAY_SERVICE | 100                  | \n| rail       |       airportLinkRail       |               HIGH_SPEED_RAIL_SERVICE | 101                  | \n| rail       |        international        |                  LONG_DISTANCE_TRAINS | 102                  | \n| rail       |      interregionalRail      |           INTER_REGIONAL_RAIL_SERVICE | 103                  | \n| rail       |            local            |                       RAILWAY_SERVICE | 100                  | \n| rail       |        longDistance         |                  LONG_DISTANCE_TRAINS | 102                  | \n| rail       |          nightRail          |                  SLEEPER_RAIL_SERVICE | 105                  | \n| rail       |        regionalRail         |                 REGIONAL_RAIL_SERVICE | 106                  | \n| rail       |       touristRailway        |               TOURIST_RAILWAY_SERVICE | 107                  | \n| taxi       |                             |                          TAXI_SERVICE | 1500                 | \n| tram       |                             |                          TRAM_SERVICE | 900                  | \n| tram       |          cityTram           |                     CITY_TRAM_SERVICE | 901                  | \n| tram       |          localTram          |                    LOCAL_TRAM_SERVICE | 902                  | \n| trolleyBus |                             |                    TROLLEYBUS_SERVICE | 800                  | \n| water      |                             |               WATER_TRANSPORT_SERVICE | 1000                 | \n| water      |  highSpeedPassengerService  |    PASSENGER_HIGH_SPEED_FERRY_SERVICE | 1014                 | \n| water      |   highSpeedVehicleService   |          CAR_HIGH_SPEED_FERRY_SERVICE | 1013                 | \n| water      |    internationalCarFerry    |       INTERNATIONAL_CAR_FERRY_SERVICE | 1001                 | \n| water      | internationalPassengerFerry | INTERNATIONAL_PASSENGER_FERRY_SERVICE | 1005                 | \n| water      |        localCarFerry        |               LOCAL_CAR_FERRY_SERVICE | 1004                 | \n| water      |     localPassengerFerry     |         LOCAL_PASSENGER_FERRY_SERVICE | 1008                 | \n| water      |      nationalCarFerry       |            NATIONAL_CAR_FERRY_SERVICE | 1002                 | \n| water      |     sightseeingService      |              SIGHTSEEING_BOAT_SERVICE | 1015                 | \n\n\n\n\n\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fentur%2Fnetex-gtfs-converter-java","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fentur%2Fnetex-gtfs-converter-java","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fentur%2Fnetex-gtfs-converter-java/lists"}