GTFS Janitor
GTFS Janitor | |
---|---|
Author: | User:TJHorner |
License: | MIT License |
Platform: | Web |
Language: | English |
Website: | gtfs-janitor.tjhorner.dev |
Source code: | tjhorner/gtfs-janitor GitHub |
Programming language: | TypeScript |
A web-based tool for conflating GTFS data into OSM. |
GTFS Janitor is a web-based tool that assists mappers in conflating data from GTFS feeds into OpenStreetMap data. It accepts a GTFS feed zip file as an input and uses a matching algorithm to conflate the stops with existing OpenStreetMap data, then guides the mapper through a disambiguation process to resolve any uncertain matches manually. It works entirely in the browser and does not require a server component.
It was created to facilitate the King County Metro bus stop import, and as such the tool may have certain leftover behavior that only makes sense for King County Metro but not other agencies. If you find something like this, please raise an issue in the repo; it is likely we can work to break it out into an import profile option.
Features
At the moment, GTFS Janitor's primary function is the ability to import and sync transit stops from a GTFS feed. The goal is to eventually be able to work with all types of GTFS data (routes, schedules, etc.), but for now it can perform the following.
Transit Stop Import
When you provide a GTFS feed, you can perform the following tasks with the transit stop data:
- Conflate existing OSM transit stop nodes with the stops in the GTFS data
- A matching algorithm attempts to match each stop with a node in OpenStreetMap
- Uncertain or ambiguous matches are presented for human review
- Update tags for existing nodes and create new nodes for unmatched stops (supported tags listed below)
- Add disused:* lifecycle key to out-of-service stops
Each type of change can be exported as an osmChange file for review in an external editor.
Stop Tags
These tags are added by default and can be extended or modified by an import profile.
Key | Value | Notes |
---|---|---|
public_transport | platform | This tag will only be added to nodes that have been newly-created by the tool. It will remain untouched for nodes that are being modified. |
name | GTFS stop_name
| |
ref | GTFS stop_code
| |
local_ref | Value of N if stop name ends in " - Bay N"
| |
route_ref | route_short_name s of each route that serves this stop separated by semicolon
| |
wheelchair | yes, no, or unchanged depending on if GTFS stop indicates wheelchair_boarding (1 = yes, 2 = no, 0/unspecified = unchanged)
| |
gtfs:stop_id | GTFS stop_id
| |
website | GTFS stop_url , if provided
|
Additional tags will be applied based on the types of route the stop serves:
GTFS Route Type | Key | Value |
---|---|---|
Bus | highway | bus_stop |
bus | yes | |
Trolleybus | highway | bus_stop |
trolleybus | yes | |
Tram | railway | tram_stop |
tram | yes | |
Ferry | amenity | ferry_terminal |
ferry | yes | |
Gondola | aerialway | station |
Funicular | railway | station |
station | funicular |
Configuration
Import Profiles
To accommodate the various differences in every region's OSM data and GTFS feed formats, GTFS Janitor uses import profiles. These are simple JSON- or YAML-format files that allow a mapper to customize various aspects of the tool's behavior, such as how nodes should be matched to transit stops and which tags the modified nodes should have. This type of customization is important to allow conformance to local mapping conventions or to transform the GTFS data into a standard format (for example, if stop names are provided as all-caps, they can be normalized to be title-case).
More information about writing your own import profile can be found in the documentation.
Presets
Import profile presets are available for the following transit agencies. If you've written a profile for your agency and want to contribute it, please feel free to open a pull request against the presets directory in the repo.
Agency | Location | Preset File |
---|---|---|
King County Metro | King County, Washington, USA | king-county-metro.yaml |