GTFS Builder Guidebook
GTFS Builder Guidebook
May 2021
A Program of the Federal Transit Administration, Administered by the Neponset Valley TMA
Table of Contents
Introduction ........................................................................................................................................................................................................... 1
1. First Steps ....................................................................................................................................................................................................... 3
1.1. Download and Configure Google Earth ................................................................................................................................................................ 3
1.2. Checklist................................................................................................................................................................................................................ 3
1.3. Macros .................................................................................................................................................................................................................. 3
1.4. GTFS Builder Guidebook Terms ............................................................................................................................................................................ 4
1.5. Final Notes ............................................................................................................................................................................................................ 4
2. Complete the agency Tab in the ImportExport File ........................................................................................................................................... 5
3. Complete the calendar Tab in the ImportExport File ........................................................................................................................................ 7
4. Complete the calendar_dates Tab in the ImportExport File .............................................................................................................................. 9
5. Complete the routes Tab in the ImportExport File .......................................................................................................................................... 11
6. Identify and Geocode Bus Stop Locations ...................................................................................................................................................... 14
6.1. Method 1 – MyMaps and Google Earth ............................................................................................................................................................. 14
6.2. Method 2 – Google Earth ................................................................................................................................................................................... 15
7. Complete the stops Tab in the ImportExport File ........................................................................................................................................... 17
8. Generate Trip and Stop_times Data in the Schedule Generator File ................................................................................................................ 20
8.1. Enter Schedule Data ........................................................................................................................................................................................... 20
8.2. Generate stop_times and trips ........................................................................................................................................................................... 26
8.3. Generate a Schedule for Agency Website .......................................................................................................................................................... 26
9. Copy and Paste the trips and stop_times Tabs into the ImportExport File from the Schedules_V3 File............................................................. 27
10. Complete the feed_Info Tab in the ImportExport File ..................................................................................................................................... 28
11. Next Steps .................................................................................................................................................................................................... 30
12. Create GTFS Text Files and Validate Data ....................................................................................................................................................... 30
13. Optional – Complete transfers, fare_attributes, and fare_rules Tabs .............................................................................................................. 31
13.1. transfers Tab ....................................................................................................................................................................................................... 31
13.2. fare_attributes Tab ............................................................................................................................................................................................. 32
13.3. fare_rules Tab ..................................................................................................................................................................................................... 34
14. Optional – Complete shapes Tab ................................................................................................................................................................... 35
14.1. Instructions ......................................................................................................................................................................................................... 35
14.2. Check Distance from Shape to Stops .................................................................................................................................................................. 37
15. GTFS Flex Workaround .................................................................................................................................................................................. 39
16. Trip Planners and GTFS Feed ......................................................................................................................................................................... 40
List of Tables
Appendix
The instructions provided in Sections 1 through 14 are for developing GTFS data for fixed routes. An add-on to GTFS, known as GTFS-Flex is currently in
development, and when complete, will accommodate on-demand, dial-a-ride and flex route services. Until GTFS-Flex is fully available, GTFS Builder offers a
“work-around” consistent with current GTFS data guidelines to publish trip information related to on-demand and flex routes. Instructions for the workaround
are found in Section 15. Section 16 offers a partial list of trip planners or feed registries that publish GTFS data.
Using the ImportExport file, data that defines the attributes of agencies, service days, fare types, routes, stops and others are entered using one of the 12 data
tabs. At a minimum, data must be entered in the agency, routes, calendars, calendar_dates, stops and feed_info tabs. Data must also be entered in the trips
and stop_times tabs. However, data is not manually entered into those tabs, but rather is generated in the Schedule Generator file and then copied and pasted
back into the ImportExport file trips and stop_times tabs. Data entry in remaining four tabs is optional depending on services provided. Instructions for filling
in the data for the required tabs is provided in Sections 1 through 12. Instructions for completing data in optional tabs follows in Sections 13 and 14.
The Schedule Generator file is used only to input trip schedules and generate trips and stop_times information. The user enters schedule information in the
file and then runs a macro to generate data into the trips and stop_times tabs. The data in the trips and stop_times tabs is then copied and pasted into similarly
named tabs in the ImportExport file. The Schedule Generator file can also be used independently to generate an agency’s schedule or table to be uploaded to
an agency website.
To view the entire specification for each data element to be entered in each tab visit http://gtfs.org/. This is an excellent resource, and it is strongly suggested
the link remain open while data is entered in both the ImportExport and Schedule Generator files. The information at this website will provide additional detail,
beyond the basic information provided herein, for each data element from the GTFS.
Other training resources are available at GTFS Builder Support including a series of eleven videos. Links and descriptions of each video follow.
1. What is GTFS and Should My Agency Proceed. This first video provides an introduction to GTFS and what GTFS looks like on a published trip plan. It also
discusses resources needed to develop GTFS including software and time, and presents options for developing GTFS files.
2. Trip Planner Licensing Agreements. Understanding trip plan data licensing agreements and what, if any, are the risks. An attorney translates a sample
agreement from legalese into English in this video.
1
3. An Introduction to GTFS Builder (Download and Setup). This video offers an introduction to National RTAP’s GTFS Builder tool and describes how is it
used to develop GTFS data. The video reviews how the application is downloaded from National RTAP’s website and how to set up a folder/workspace on
a desktop appropriate for GTFS. Other topics include enabling GTFS Builder macros, common GTFS terminology and where to find comprehensive GTFS
resources. The video supports and expands on information provided in Section 1 of this Guidebook.
4. Agency, Calendar, Calendar_dates, Routes, Fare and Transfer Tabs in the ImportExport File. This video demonstrates how data is entered into each of
these tabs. The video supports Sections 2, 3, 4, 5 and 13 of this Guidebook.
5. Identify Bus Stop Coordinates and Complete the Stops Tab in the ImportExport File. This video demonstrates how bus stop coordinates are established
using a combination of Google’s MyMaps and Google Earth Pro. Once the stops are identified, the video shows how bus stop data is entered into the stops
tab. This video supports Sections 6 and 7 of this Guidebook.
6. Using the Schedules_V3 Tab in the Schedule Generator File to complete the Trips and Stop Times Tabs in the ImportExport File. This video
demonstrates how to develop schedule data using GTFS Builder’s Schedule Generator file and then enter that data into the stop_times and trips tabs in
the ImportExport file. The video also provides an in-depth explanation of the important distinction between routes and trip groups. The video supports
Sections 8 and 9 of this Guidebook.
7. Feed _info Tab, Exporting, Validating and Hosting GTFS Data. This video demonstrates completing the feed_info tab in the ImportExport file, exporting
the data into text files, compressing the data, validating/checking the data, resolving common errors and how to host the data so it can be consumed by a
trip planner (for example Google). The video supports Section 12 of this Guidebook.
8. Creating Trip Group Shapes and Complete the Shapes Tab in the ImportExport File. This video details creating the shape for each trip group using
Google’s MyMaps and Google Earth Pro along with entering that data into the ImportExport file. A method to check that bus stops are reasonably close to
the trip group shape file is also presented. While shapes are optional, riders appreciate seeing the route on the road. The video supports Section 14 of this
Guidebook.
9. Demand Response Services. Until all trip planners allow flexible on-demand services to be published, GTFS Builder offers an easy workaround to ensure
these services are seen on trip planners. This video shows how to build a “flex workaround” dataset within the current constraints of “fixed and timed”
schedules required by Google and other trip planners. The video supports Section 15 of this Guidebook.
10. Uploading Data to a Trip Planner (such as Google). Focused primarily on Google’s trip planner, testing, feed configuration, data visualization, how to
request to launch and other relevant topics are covered in this video. This video supports and expands on information offered in Section 16 of this
Guidebook.
11. Keeping GTFS Up to Date. This video reviews how to maintain and update existing GTFS.
For further technical assistance, please contact National RTAP either by email ([email protected]) or by phone (888-589-6821). These contacts can also be
used to provide input on this document. Constructive feedback is appreciated and used to improve the process for future users of GTFS Builder.
2
1. First Steps
Additional support and a demonstration of the explanations provided in this section are available in this video.
1.2. Checklist
A checklist of all the items to be completed through the development of GTFS data can be found in the Appendix. This is a useful tool for those who may
work intermittently on this process.
1.3.Macros
Macros in both files need to be enabled for GTFS Builder to function properly. The macros in the two GTFS Builder files are scripts that automate several
processes required to fully generate the data needed for a GTFS file. It is recommended that an agency’s IT department be contacted before enabling
macros.
Depending on the operating system being used, macros may be enabled simply by responding “yes” to the question “Make this a Trusted File?”. However,
if this question does not pop-up, enable macros in the GTFS files, or folder containing the files, using these general steps.
1. Open Excel
2. Select Options at the bottom of the left menu.
3. Select Trust Center at the bottom of the left menu.
4. Click on the Trust Center Settings button. At this point two options are available:
a. Enable macros in a folder in which both the ImportExport and Schedule Generator files are stored.
i. Select “Trusted Locations” near the top of the left menu.
ii. Select “Add New Location” and use the Browse button to find the folder in which the two GTFS Builder files are stored.
3
b. Select individual files.
i. Select “Trusted Documents” in the left menu.
ii. Check the box next to “Allow documents on a network to be trusted.”
iii. Click on OK.
Public Facing: If a “yes” is shown what is entered in this document’s tables will display on a trip planner. A “no” indicates the data is used internally.
Required/Optional: Required indicates data must be entered for GTFS data to be complete and pass validation test (described later in Section 12). Data
may or may not be entered in the columns labeled optional.
Trip Group: A trip group includes all trips provided by a route in which the same consecutive bus stops are serviced. For example, if Route A morning and
late afternoon trips service stops 1, 2, 3, 4 and 5 and midday trips services stops 1, 3 and 5, the route would consist of two trip groups each with a unique
name.
1.5.Final Notes
It is recommended that data be entered into GTFS Builder in the order presented in this Guidebook. However, if it is preferred to obtain and enter bus stop
coordinates first, skip ahead to and complete Section 6.0 Identify and Geocode Bus Stop Location and Section 7 Complete the stops Tab in the ImportExport
File. But be sure to return to the beginning of the guidebook and complete all required sections.
If the route name, or any data, is copied directly from the agency website, be sure to paste it as plain text.
No data, including Stop names, entered into either the ImportExport or Schedule Generator files can include a comma (“,”). The final exported text files
are comma separated and extraneous commas will invalidate the data.
Do not change cell formats in either the ImportExport or Schedule Generator files. Reformatting may result in invalid data.
It is suggested an agency enter and validate one route to ensure data is being entered correctly before proceeding with additional routes.
Good Luck!
4
2. Complete the agency Tab in the ImportExport File
Using the example data and explanatory information in Table 2.1 enter data in the agency tab. Figure 2.1 depicts how the public facing data is depicted on a
trip plan. Additional support and a demonstration of the explanations provided in this section are available in this video.
5
Table 2.1 agency Tab (continued)
agency_phone
agency_fare_url
agency_url
6
3. Complete the calendar Tab in the ImportExport File
Service-related calendar information is established and entered in the calendar tab. It establishes a service_id which defines the days of the week various
routes or trips can operate during a specific time period. Various combinations of days of service within a time period can be entered. Service_ids may be
assigned to multiple routes or trip groups. Additional support and a demonstration of the explanations provided in this section are available in this video.
Using the example data and explanatory information in Table 3.1 enter data in the calendar tab.
7
Table 3.1 calendar Tab (continued)
8
4. Complete the calendar_dates Tab in the ImportExport File
In the calendar_dates tab, enter exceptions to service_ids listed in the calendar tab. Exceptions could include holidays with no service on a date encompassed
in the range of dates entered in the calendar_dates tab, a Saturday service schedule operating on the day after Thanksgiving and others. For example, entries
in this tab can also omit or remove a weekday service and add in a Sunday service for that date. Multiple exceptions can be added for each service_id, however
only one exception can be entered per row. Additional support and a demonstration of the explanations provided in this section are available in this video.
For convenience, a list of Federal holidays, in the required GTFS data format, can be found here.
Using the example data and explanatory information in Table 4.1 enter data in the calendar_dates tab.
9
Figure 4.1 shows how data entered in the calendar and calendar_dates tabs is depicted on a trip plan. In this trip plan, no service is provided on Monday,
February 15, 2021 as it is a federal holiday. Therefore, the next scheduled trip is on Tuesday.
calendar_dates
tab/date
calendar_dates tab/
exception_type
(2= no service)
calendar
tab/service_id
Figure 4-1 Calendar and Calendar_Dates Tabs Data Displayed on a Trip Plan
10
5. Complete the routes Tab in the ImportExport File
Routes are published as displayed on an agency’s website. A route may consist of one or more trip groups. Trips within the same route may have the same or
different schedules on different days of the week and may service the same or different bus stops. For example, a route may run eight trips a day. Two trips
that occur during peak commuting periods may service a greater number of stops than six midday trips that may service only a few stops. In this case, the route
consists of two trip groups. Each route’s trip groups will be defined later in the process. Additional support and a demonstration of the explanations provided
in this section are available in this video.
Using the example data and explanatory information in Table 5.1 enter data in the routes tab.
11
Table 5.1 routes Tab (continued)
12
Figure 5.1 depicts how the public facing data in the routes tab is depicted on a trip plan.
route_short_name
(16)
route_type
(3=bus)
route_text_ color
(black 000000)
route_color
(pink FF9999)
route_url
13
6. Identify and Geocode Bus Stop Locations
Bus stop locations are entered in the ImportExport file in the stops tab. But first, the stops need to be precisely identified and located through Global Position
System (GPS) coordinates known as longitude and latitude. This is process is known as geocoding. The required datum is WGS84.
For routes with only flag stops, it is recommended several stops where riders frequently flag buses, and are considered safe locations, be selected along the
route. These on-demand bus stop locations also need to be geocoded. For routes and segments of trips with a combination of fixed and flag stops, options for
continuous_pickup and drop_off can be set in the Schedules_V3 tab. A single stop can be used by multiple routes, trips and agencies.
In this step, the ImportExport file can be minimized as other applications will be used.
Coordinates can be established using many different approaches. In some cases, state DOTs, regional planning agencies/organizations, county or city GIS
planning departments or dispatch software may already have stop coordinates available for an agency or may be able to assist with this process. Bus stop
coordinates can also be established using proprietary GIS software such as ArcGIS, smart phone applications or others. If one of these methods are used, it is
important to test the coordinates by entering them into Google Earth and confirm they are accurately located off the road and positioned where riders can
safely wait for a bus. Once a list of bus stops is obtained and confirmed to be accurate, skip ahead to Section 7 stops Tab. However, without outside support or
GIS software, agencies can, for free, download and use Google Earth Pro for Desktop or a combination of Google MyMaps and Google Earth to establish their
bus stop coordinates. An agency may enter the list from their partner agency into the ImportExport file and then view all the stops.
This section of the guidebook offers detailed instructions for two methods to geocode or identify bus stop locations. Although there are several steps to
geocoding bus stops, they are presented as simply as possible and can be easily completed by someone new to the process. Additional support and a
demonstration of the explanations provided in this section are available in this video.
14
4. Identify bus stops (remember a bus stop shared by different routes or trips is entered only once in the stops tab)
a. Click on the in the menu bar.
b. Bring the + to the exact location of the first bus stop and click. Make sure the stop is located on the side of the road and not in the center of
the road or on a sidewalk. Once the location is selected, a dialog box will appear.
c. In the first block, input the stop_id, in the second block provide the stop_name (do not enter any commas in the name) and then select Save.
d. Repeat a through c until all stops are identified.
5. Export the bus stop locations from MyMaps to Google Earth.
a. Click on three dots next to map name and select “Export to KML/KMZ”. Select the correct layer where the stops are contained.
b. Check “Export as KML instead of KMZ…” then Download and Save
c. Depending on a computer’s settings:
1. Google Earth may automatically launch, or
2. It may be necessary to open Google Earth and then open the KML file in the computer’s download folder (that may be in the lower left
side of screen).
d. In each of these cases, the KML file should automatically appear under My Places or Temporary Places (in the left side of the screen) and the
stops should appear on the map identified by pins. Zoom in to view a few stops to confirm they are in the correct location.
6. Prepare to copy stops into the ImportExport file
a. The KML file will display on the left side in Google Earth under either My Places or Temporary Places.
b. Right click on small blue globe next to the file name.
c. Select Copy, or from the top navigation menu select Edit>Copy.
7. Proceed to Section 7 Complete the stops tab in the ImportExport File.
1. In Google Earth - desktop version (if not already downloaded, see Section 1 First Steps for download instructions).
a. On left menu, right click on My Places>Add>Folder.
b. Name the folder.
2. Identify bus stops
a. On the map, go to the approximate bus stop location.
b. Click on the yellow placemark pin in top menu. A pin will appear on the map and a dialog box will open.
15
c. Move the placemark pin to the exact bus stop location. Make sure the stop is located on the side of the road, not in the center of the road, not
too close to the curb or on a sidewalk. The stop does not need to be located exactly at the bus stop sign or shelter, just nearby.
d. In the placemark dialog box, add name (a simple code or abbreviation). This will be shown as the stop_id in GTFS Builder.
e. In the placemark dialog box, add a description. This will be input as the stop_name in GTFS Builder.
f. Select OK and the stop should appear in the folder.
g. Repeat steps a through f as necessary to identify all bus stops, including paired stops located on both sides of the street. Even though a website
may use one name for a paired stop, both stops need to be geocoded and both must have different stop_ids.
3. Prepare to copy stops into the ImportExport file
a. In the left menu, right click on small blue globe next to the folder name.
b. Select Copy or, from the top navigation menu, select Edit>Copy.
4. Proceed to Section 7 Complete the stops tab in the ImportExport File.
16
7. Complete the stops Tab in the ImportExport File
1. Open the ImportExport file and stops tab, go to a blank row in Column A.
2. Double left click, and when the pop up displays, type 4 (Paste Point(s)).
3. The file’s macro will populate the stop_id, stop_name, and latitude and longitude columns. Remove or replace any commas (“,”) in the stop_id or
stop_name.
4. To establish if the bus stop is wheelchair accessible, manually enter a “1” in the last column: wheelchair_boarding. Leave this column blank if unknown.
5. As needed, fill in data designed as “Optional” for each stop_id.
Using the example data and explanatory information in Table 7.1, complete data entry for the stops tab. Note that stop latitude/longitude must be in the
WGS84 datum. Also, once the stop data is entered into the stops tab, stops can be seen on Google Maps. To view a single stop on Google Maps, click inside a
row containing stop data and in the pop-up menu, click on the number 3. To view all stops, select 1 or 2. Additional support and a demonstration of the
explanations provided in this section are available in this video.
17
Table 7.1 stops Tab (continued)
18
Figure 7.1 depicts how the public facing data from the stops tab is depicted on a trip plan.
stop_timezone
stop_name
19
8. Generate Trip and Stop_times Data in the Schedule Generator File
The Schedule Generator file is used to develop data for the ImportExport file trips and stop_times tabs. It is not used to directly export data to GTFS text files.
Data is manually entered in the Schedules_V3 tab. Data is then automatically generated in the trips and stop_times tabs using the file’s macros.
In this file, a trip group includes all trips provided by a route in which the same consecutive bus stops are serviced. For example, if Route Z morning and late
afternoon trips service stops 1, 2, 3, 4 and 5 and midday trips services stops 1, 3 and 5, the route would have two trip groups. In this case, the trip groups for
Route A could be called RouteZAMPM and RouteZMID. Additional support and a demonstration of the explanations provided in this section are available in this
video.
20
Table 8.1 Schedules_V3 Tab
21
Table 8.1 Schedules_V3 Tab (continued)
22
Table 8.1 Schedules_V3 (continued)
23
Table 8.1 Schedules_V3 Tab (continued)
1
The columns are formatted to display 24-hour time; however, the trip planner will likely show the time in a 12-hour format.
24
In the sample data shown in Table 8.2, note that there is a blank row (Row 33) between the two trip groups. All trip groups must be separated by a blank row.
In the first row of each trip group (Row 2, and then in the example below, row 34) data is entered only in columns A (trip group), P (wheelchair status) and Q
(bicycle status). The shape_id (and if used, block-id) associated with each trip is also entered in these rows. No other data should be entered in the first row of
each trip group. For further information about Shapes, refer to Section 14 Optional - shapes Tab.
25
8.2.Generate stop_times and trips
In the Schedule Generator file, and Intro.Control tab, under the list of Macros:
1. In the Schedules_V3 tab, enter data as described above in Sections 8.1 and 8.2. Be sure to enter a “1” in the timed_stop column for each stop to be
shown in a schedule timetable.
2. In the Intro.Controls tab click on “Generate Timed Stops.” A new table is created in the timed_stop tab with stops listed in the top row. The table
can be transposed using the Excel function Paste Special to have the stops listed in one column with the times to the right.
3. Format the timetable to match agency branding.
4. Copy the schedule directly onto the agency website, or
5. Copy schedule to a Google Sheet (in a Google Account) and then “embed” with a link from the Google Sheet to the agency website. The Using the
Schedules_V3 Tab in the Schedule Generator File to complete the Trips and Stop Times Tabs in the ImportExport File video found here provides
additional support and instructions.
26
9. Copy and Paste the trips and stop_times Tabs into the ImportExport File from the Schedules_V3 File
Make sure both the ImportExport and Schedule Generator files are open.
1. From the Schedule Generator file trips tab, copy all data (including row 1) and paste it into the ImportExport file trips tab. To easily copy an entire
worksheet, choose the block left of A and above 1, right click and select copy (or use control+C). To paste an entire worksheet, right click paste in cell
A1 (or use control+V). An attempt to paste elsewhere results in a warning to select cell A1 to match the data format of what was copied.
2. From the Schedule Generator file stop_times tab, copy all data (including row 1) and paste it into the ImportExport file stop_times tab.
3. Save and close the Schedule Generator file. It will not be needed again unless data is identified in the validation process that needs to be corrected or
in the future when services are updated.
Figure 9.1 depicts how the public facing data from the stop_times tab is depicted on a trip plan.
Additional support and a demonstration of the explanations provided in this section are available in this video.
stop_times Tab/
arrival/departure_times
Figure 9-1 \Trips and Stop_Times Tabs Data Displayed on a Trip Plan
27
10. Complete the feed_Info Tab in the ImportExport File
Using the example data and explanatory information in Table 10.1, enter data in the feed_info tab. Additional support and a demonstration of the explanations
provided in this section are available in this video.
28
Table 10.1 feed_info Tab (continued)
29
11. Next Steps
At this point, all required data has been entered into the ImportExport file. However, if data related to fares or transfers is to be entered, skip to Section 13. If
trip shapes are to be created, skip to Section 14. Otherwise, proceed to Section 12 to create the GTFS data text file and validate the data.
A common error is duplicate stops with the same, or too close geocoding. In this case, simply delete the extra stop in all tabs it is referenced. Another common
error are colors, determined in the routes tab, that are not sufficiently contrasting to meet ADA requirements. This may be resolved by changing from white to
black or the reverse.
30
13. Optional – Complete transfers, fare_attributes, and fare_rules Tabs
To display information related to one-way adult fares and refine how transfers between routes display, data must be entered into these similarly named tabs.
Data entry in these three tabs is not required. However, if data is to be entered, data in the columns listed shown in the tables below as “Required” must be
entered. Additional support and a demonstration of the explanations provided in this section are available in this video.
31
13.2. fare_attributes Tab
Riders appreciate knowing what it costs to jump on the bus. If a one-way adult fare system cannot be accurately modeled, avoid confusion and leave the
fare related tabs blank. As an option, provide a link to more fare information through the agency_fare_url (in the agency tab).
Fares will display only for one-way adult trips. Currently, the GTFS do not provide an option to show monthly passes, discounts for seniors/youth or others.
Fares require data to be entered in the fare_attributes and fare_rules tabs.
Table 13.2 provides sample data, as well as explanatory information for the fare_attributes tab.
32
Table 13.2 fare_attributes Tab (continued)
33
13.3. fare_rules Tab
Data entered in this tab, specifies how fares_ids, established in the fare_attributes tab, are applied to itineraries using route_ids and, if needed, zones.
Zones include the origin zone, the destination/final zone and any zones the route passes through (contains_id). Zone-id listed under origin, destination and
contains are defined in the stops tab. Table 13.3 provides sample data, as well as explanatory information for the fare_rules tab.
34
14. Optional – Complete shapes Tab
On a map, a shape helps snap the trip to roads. Without shapes the route often displays the trip “stop to stop” with straight lines over buildings, rivers and
parks. Shapes are associated with trip groups, and consist of a sequence of points on a map through which a vehicle passes in a unique stop order. Establishing
and entering shape data into the shapes tab is optional and may be time consuming. However, shapes are required elements and must be established if
continuous pick-up and drop-off are allowed on a trip group or route. Similar to establishing bus stop locations, Google MyMaps and Google Earth are used to
detail the trip’s shape. The shape data also assures that all the stops on that trip are in the correct stop order. Agencies can use other mapping software if
available. Some prior experience with Google Maps ”MyMaps” products may be helpful.
A shapes “line” is generated in .kml. The kml data is entered in the ImportExport file in the shapes tab as a list of points (latitude and longitude) which define
the path of a trip.
Shapes points along a trip do not need to intersect the location of stops exactly, but all stops on a trip should lie within a short distance of the shape for that
trip. GTFS Builder checks the distance between the stops and the trip shape, and provides an alert if the stop is located over 30 meters (approximately 100 feet)
from the trip shape. It is recommended a shape_point be located ahead of the stop within 30 meters. Instructions on how to test the proximity of stops to trip
shapes, and make corrections, are described below.
To observe and follow the steps of creating a new shape, refer to the Creating Trip Group Shapes and Complete the Shapes Tab in the ImportExport File video.
14.1. Instructions
1. Open the ImportExport file and shapes tab.
2. Go to mymaps.google.com
a. Select the map used to establish the bus stop coordinates in Section 6 Identify Bus Stop Locations.
b. Check the box at the bus stop layer so the bus stops are showing on the map.
c. Click on “Base Map” and select the Satellite view (top middle block).
d. Click on the curved arrow the in the menu bar.
e. Click on “Untitled layer” and re-name it “trip one” or other. The shape_id could also be used as the name.
f. Under the Driving icon (left menu), enter a bus stop location for location “A”. Then enter the final bus stop for the shape in “B.” A few middle
stops can be entered along the way, by clicking on “Add Destination” and then reordering (by dragging) the list. Up to ten stops (A to J) along
a trip group path can be entered. All stops do not need to be defined or listed. This is an approximate path on the roads the trip will travel.
g. The initial trip shape path is shown on the map in blue. Confirm that it respects one-way streets.
h. If the path shown needs to be modified to better show the correct route of the trip, click on the path in the area where an edit is required. A
white circle will appear. Drag the circle to adjust the path as needed. Make as many adjustments as needed to represent the best sketch of
the trip.
35
i. Do not attempt to edit the path in areas where it passes through a parking lot or along private roads. Focus only editing the primary path on
the road. Sections of the path that passes through parking lots/private property are refined later in this process.
j. Click on three dots next to the map name and select Export to KML/KMZ and select the correct shape layer.
k. Check “Export as KML, not KMZ” and then Download.
l. Depending on Google Earth’s settings, Google Earth automatically launches or may need to be opened.
3. Open Google Earth
a. Depending on a computer’s settings:
1. Google Earth may automatically launch and KML file displays, or
2. It may be necessary to open Google Earth and then open the KML file in the computer’s download folder.
b. In each of these cases, the KML file should automatically appear under My Places or Temporary Places.
c. Right click on small blue globe left of the layer created.
d. Select Copy or, from the top navigation menu, select Edit>Copy.
4. Return to the ImportExport file and shapes tab
a. In column A, go to a blank row.
b. Double left click and type 7 (Paste KML/GPX line...).
c. Enter the name of the shape_id for this trip. Make sure this name matches shape_id either previously entered or to be entered in the trips tab.
d. The points, and their coordinates, that establish the shape will appear, along with the sequence of the points and the distance between each
point.
5. To replace or update an existing shape
a. Follow steps 1 through 4b.
b. After the 7 is entered, a dialog box will appear asking if you are replacing or updating a shape_id. Agree that this process will replace prior data
and cannot be undone by selecting OK twice.
Table 14.1 provides sample data, as well as additional explanatory information for the shapes tab.
36
Table 14.1 shapes Tab
37
c. Double click on stops where distance errors are noted. Corrections can be made by either moving one of the pins (representing a point on the
trip shape) closer to the stop or by adding a new point near the stop. But first, right click on the path near the stop in question and select
properties. Ignore the white box/field that opens. If necessary, move it away from the area to be worked on.
1. To move a point or pin along the line, click on the pin. When the color changes from red to blue, drag it closer to the stop.
2. To add a point, click on any red dot on the path near the stop. When it turns blue, add a point after that one and then drag it to a
location within 100 feet of the stop. It is recommended the pin be located just ahead of the bus stop pin.
3. When a stop is used multiple times through a trip group, the first pass through the stop must be the lowest number on the
shape_points, the second pass through the stop must be the next highest value, etc.
d. Once the corrections are made, in the left menu, right click on the globe next to the trip corrected and select copy.
3. Return to the ImportExport file
a. Open shapes tab
b. Go to a blank row.
c. Double left click and type 7 (Paste KML/GPX line...).
d. Enter the exact name of the trip shape_id.
e. Reply yes to replacing data.
f. The points, and their coordinates, that establish the shape_id will appear, along with the sequence of the points and the distance between
each point.
38
15. GTFS Flex Workaround
Until Google and other trip planners allow flexible on-demand services to be published with the forthcoming GTFS-Flex specifications, GTFS Builders offers an
easy workaround to ensure these services are seen on trip planners. The following details how to build a “flex workaround” solution within the current
constraints of “fixed and timed” schedules required by Google and other trip planners. Additional support and a demonstration of the explanations provided
in this section are available in the Demand Response Services video.
1. Create a simple “workaround route” on the agency website. The route can consist of a few stops (4 to 8 stops) and include as few as one trip per day
or even one trip per week. The “workaround route” must be shown on the agency website and it must indicate on the website that riders are not
required to call-in to travel using the “workaround route.” As described above in Section 8.3 Generate a Schedule for Agency Website, a simple schedule
can be created using the Schedule Generator file and copied onto the agency website.
2. Data related to this route, along with any other agency fixed routes, are entered into the ImportExport file using the instructions provided in Sections
1 through 14 above. In the Schedule Generator file, Schedules_V3 tab, “2” must be entered in the pickup_type and drop_off_type columns for the
“workaround route” to indicate the rider must phone the agency to arrange pickup and drop-off. For the trip plan to show riders where the flexible
route will pick-up them up or drop-off them off, a shape_id must be included to define the path between stops.
3. Assuming, Google is selected for one of the agency’s preferred trip planners, sign up and, as instructed, include a link to the simple “Workaround”
route. Agree that services do not require a reservation.
4. Once launched, the agency can then enter details for continuous_pick-up and drop-off, as well as rider must call for a pick-up.
39
16. Trip Planners and GTFS Feed
There are many trip planners that GTFS data can be consumed by or published. Google, Apple, Bing, CityMapper, Google, Moovit and the TransitApp are
examples. Each has its own set of instructions and requirements. Additional support and a demonstration of the explanations provided in this section are
available in this video.
Often an agency will publish the fully valid GTFS .zip file at the agency’s website with a URL and these trip planning services can “ping” or check that URL daily
and publish updated data. There are also feed registries that connect an agency’s data to all trip planners that “ping” or check that URL and make the feed
publicly available. If an agency does not want the feed hosted at its website, National RTAP offers this service. To learn more, visit GTFS Builder Support.
Google Inc. requires a signed license agreement. This Trip Planner Licensing Agreements video found here provides an explanation of the low-risk terms detailed
in the agreement. Other trip planners may request a simple email from an agency confirming they can publish agency’s GTFS data. Contact information for a
few sample feed registries and trip planners are listed below:
Apple [email protected]
Bing [email protected]
CityMapper https://citymapper.com/contact
Google Transit/ https://support.google.com/transitpartners/answer/1111481,
Google Maps https://support.google.com/transitpartners/contact/agency_participate
Moovit https://moovit.com/contact-us/
National Transit Map https://www.bts.gov/national-transit-map/how-participate
Rome2Rio https://help.rome2rio.com/en/support/tickets/new
TransitApp http://transitapp.com
Transitfeeds Open Mobility Data: https://transitfeeds.com
TransitLand feed registry https://www.transit.land
This list is not endorsed by National RTAP but may ease an agency’s ability to enhance their riders’ experience with multiple platforms or channels for trip
planning. National RTAP understands that there may be additional services offered by some of these companies, however the basic trip planning should be
offered at no cost to the agency. National RTAP does not guarantee or require any agency to use these services or qualify their services.
40
Appendix
GTFS Builder Check List
National RTAP GTFS Builder Checklist
For further technical assistance, please contact National RTAP either by email ([email protected]) or by phone (888-589-6821). These contacts can also be
used to provide input on this document. Constructive feedback is appreciated and used to improve the process for future users of GTFS Builder.