-
Notifications
You must be signed in to change notification settings - Fork 31
Configuration
For every city or area a GTFS is exported a particular configuration file in json
format needs to be created. When running osm2gtfs the configuration file should be defined with an argument. For example
python osm2gtfs -c "RELATIVE/PATH/TO/THE/CONFIGURATION_FILE.json"
This file contains the following sections:
- query: Specify the area and the tags to query OpenStreetMap data.
- stops: Settings on features regarding stops without a name.
- agency: Information about the transport agency.
- feed_info: General information about the GTFS publisher or creator.
- output_file: Where to store the generated GTFS file.
- schedule_source: Location to get the schedule information from
- selector: A name used as an identifier of the folder containing special development
Specify the area and the tags to query OpenStreetMap data.
"query": {
"bbox": {
"n": "", # Decimal latitude of the north end of the bounding box
"s": "", # Decimal latitude of the south end of the bounding box
"e": "", # Decimal longitude of the east end of the bounding box
"w": "" # Decimal longitude of the west end of the bounding box
},
"tags": { # Example tag to select route relations from OSM
"route": "bus",
"public_transport:version": "2"
}
Settings on features regarding stops without a name.
"stops": {
"name_without": "", # Specify which name to use for stops without any data in OSM about the name.
"name_auto": "yes" # Enable (or disable) additional queries to intelligently guess a stop name based on relevant points of interests near by. Should be used carefully, as the OSM Overpass API is reaching it's limit quickly.
}
Information about the transport agency
"agency": {
"agency_id": "", # A short hand and unique identifier for the agency.
"agency_name": "", # Full and official name of the transport agency
"agency_url": "", # Website link of the transport agency.
"agency_timezone": "", # The agency_timezone field contains the timezone where the transit agency is located. As values [tz database time zones](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) are accepted.
"agency_lang": "", # Contains a two-letter ISO 639-1 code for the primary language used by this transit agency.
"agency_phone": "", # A single voice telephone number for the specified agency.
"agency_email": "", # A single email address for the specified agency.
"agency_fare_url": "" # Specifies the URL of a web page that allows a rider to purchase tickets or other fare instruments for that agency online.
}
General information about the GTFS publisher or creator.
"feed_info": {
"publisher_name": "", # Contains the full name of the organization that publishes the feed
"publisher_url": "", # Contains the URL of the feed publishing organization's website
"version": "1", # The feed publisher can specify a string here that indicates the current version of their GTFS feed
}
Where to store the generated GTFS file.
"output_file": "data/COUNTRYCODE-NETWORKNAME.zip", # A relative path and file name where to store the generated GTFS archive
Location to get the schedule information from. This can be either a local file or an URL. For the standard trip creator, it expects the file to follow the format specification under Schedule.
"schedule_source": "" # Link to raw version of schedule.json
A name used as an identifier of the folder containing special development
"selector": "" # A one word identifier for the folder and class name used for overriding certain parts of the GTFS creation. Refer to the development page for more information.
Please have a look at the existing configuration files: