0% found this document useful (0 votes)
148 views45 pages

GTFS Builder Guidebook

This document provides a guide for transit agencies to build a General Transit Feed Specification (GTFS) feed, which allows them to publish their transit schedule and route data in a digitized format. It outlines the steps to complete various tabs in an ImportExport file to define agency, route, stop, and schedule information. It also describes optional tabs to include transit transfers, fares, and shapes. The goal is to generate GTFS text files that can be validated and used in trip planning applications.

Uploaded by

okba
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
148 views45 pages

GTFS Builder Guidebook

This document provides a guide for transit agencies to build a General Transit Feed Specification (GTFS) feed, which allows them to publish their transit schedule and route data in a digitized format. It outlines the steps to complete various tabs in an ImportExport file to define agency, route, stop, and schedule information. It also describes optional tabs to include transit transfers, fares, and shapes. The goal is to generate GTFS text files that can be validated and used in trip planning applications.

Uploaded by

okba
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 45

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

Table 2.1 agency Tab................................................................................................................................................................................................................ 5


Table 3.1 calendar Tab ............................................................................................................................................................................................................. 7
Table 4.1 calendar_dates Tab .................................................................................................................................................................................................. 9
Table 5.1 routes Tab............................................................................................................................................................................................................... 11
Table 7.1 stops Tab ................................................................................................................................................................................................................ 17
Table 8.1 Schedules_V3 Tab................................................................................................................................................................................................... 21
Table 8.2 Schedules_V3 Sample Data .................................................................................................................................................................................... 25
Table 10.1 feed_info Tab ....................................................................................................................................................................................................... 28
Table 13.1 transfers Tab......................................................................................................................................................................................................... 31
Table 13.2 fare_attributes Tab............................................................................................................................................................................................... 32
Table 13.3 fare_rules Tab....................................................................................................................................................................................................... 34
Table 14.1 shapes Tab ............................................................................................................................................................................................................ 37

Appendix

GTFS Builder Checklist


Introduction
General Transit Feed Specification (GTFS) is the international standard used to digitize and publish trip plan data and can also be used to generate timetables
used on an agency’s website. GTFS Builder consists of two Excel files including the ImportExport file and the Schedule Generator file. An agency must have
Microsoft Excel downloaded to use the GTFS Builder Web App. In the ImportExport file, there are 12 tabs in which data is entered. Data in each tab is exported
into separate text files using an automated process enabled in the Excel file through a macro. A valid GTFS is the result of compressing or “zipping” these text
files together. The GTFS data is saved in a URL and that URL is made available to trip planners, such as Google Maps. National RTAP offers free and secure
hosting of the URL which contains the GTFS data.

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.1.Download and Configure Google Earth


Section 6 of this guidebook provides instructions on how to geocode or locate bus stop coordinates. Google Earth will be needed for this process. Google
Earth will also be needed if trip shapes files are to be developed. Although bus stop coordinates are required, trip shape files are optional. For more
information on shape files, refer to Section 14. If the desktop version of Google Earth is not currently available on the PC used to manage this project,
download the desktop version of Google Earth Pro. There is no cost for this version of Google Earth. This link is to the landing page to secure Google Earth
Pro on Desktop version: Google Earth. Configure Google Earth following these three steps.

1. Go to Tools>Options>3D View>Show lat/long


2. Select Decimal Degrees
3. Select Apply and OK

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.

1.4.GTFS Builder Guidebook Terms


The following terms are used in the tables contained in this guidebook:

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.

Table 2.1 agency Tab

Field agency_id agency_name agency_url agency_timezone


Sample Data CTS Clallam Transit System https://www.clallamtransit.com America/Los_Angeles
America/Phoenix
Public Facing No Yes Yes Yes
Required/Optional Required Required Required Required
Format Text Text URL Time zone
Notes Any name, abbreviation or Agency name is identical to This is the URL of the agency’s For a list of time zones, refer to:
number is acceptable. what is published at the public website. https://en.wikipedia.org/wiki/List_of_tz_d
agency_url. It allows riders to link back to atabase_time_zones
the agency website for In this website, and in the table called List,
additional information. use the TZ database name shown in the
If an agency does not have a third column.
website, visit Website Builder Timezones (TZ), in this specification are not
3.0 for information on a no-cost “Pacific” or “Mountain” or “Central”.
Website Builder tool.
This table continues on the next page.

5
Table 2.1 agency Tab (continued)

Field agency_lang agency_phone agency_fare_url agency_email


https://www.clallamtransit.
Sample Data
en (360) 452-4511 com/Fares-Passes [email protected]
978-844-RIDE
Public Facing No Yes Yes Yes
Required/Optional Required Optional Optional Optional
Format Language Code Text URL email
Notes "en" for English. Can include numbers, URL of a web page that
Establishes the primary language the transit dashes and dialable letters. provides information
agency publishes its website. Enables related to fares, purchasing
translating from primary language to other tickets or other fare
languages. instruments.

agency_phone

agency_fare_url

agency_url

Figure 2-1 Agency Tab Data Displayed on a Trip Plan

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.

Table 3.1 calendar Tab

Field service_id monday tuesday wednesday thursday friday


mtwtf 1 1 1 1 1
Sample Data sat 0 0 0 0 0
67 0 0 0 0 0
Public Facing No No No No No No
Required/Optional Required Required Required Required Required Required
Format Text or Number Number Number Number Number Number
Notes Uniquely identifies a 1 - Service is 1 - Service is 1 - Service is 1 - Service is 1 - Service is
set of dates when available for all available for all available for all available for all available for all
service is available for Mondays in the date Tuesdays the date Wednesdays in the Thursdays in the Fridays in the date
one or more trips or range. range. date range. date range. range.
routes. 0 - Service is not 0 - Service is not 0 - Service is not 0 - Service is not 0 - Service is not
available for available for available for available for available for Fridays
Mondays in the date Tuesdays in the date Wednesdays in the Thursdays in the in the date range.
range. range. date range. date range.
This table continues on the next page.

7
Table 3.1 calendar Tab (continued)

Field saturday sunday start_date end_date


0 0 20210101 20221231
Sample Data 1 0 20210101 20221231
1 1 20210101 20221231
Public Facing No No No No
Required/Optional Required Required Required Required
Format Number Number YYYYMMDD YYYYMMDD
Notes 1 - Service is available for all 1 - Service is available for all The start_date is set to the first The future date the service_id
Saturdays in the date range. Sundays in the date range. date the trip will operate. terminates.
0 - Service is not available for 0 - Service is not available for The range cannot be completely
Saturdays in the date range. Sundays in the date range. in the future. At least one of the
start_dates for one service_id
must be current or in the past.

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.

Table 4.1 calendar_dates Tab

Field Service_id date exception_type


Sample Data mtwtf 20210215 2
Sat 20211126 1
Public Facing No No No
Required/Optional Required Required Required
Format Text YYYYMMDD Number
Notes Must exactly match one of the service_ids Date when service exception occurs. 1 - Service has been added for the specified
listed in the calendar tab. Typically, holidays are listed. date.
2 - Service has been removed for the
specified date.

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.

Table 5.1 routes Tab


route_short_na route_long_
Field route_id agency_id me name route_desc route_type route_url
https://www.clallamtransi
Sample Data 16 CTS 16 3 t.com/route16
Downtown http://www.transitTown.g
TransitP TransitTown Plaza 3 ov/ purple
Public Facing No No Yes Yes No No Yes
Required/Optional Required Required Optional Optional Optional Required Optional
Format Text Text Text Text Text Number URL
Notes Identifies name Must match Generally, one A short or long It is Typically, 3 for URL or web page for a
of route. one name word or name must be recommended short or long- route.
Each route_id listed in the number under entered, but this column be distance bus If the route’s schedule
value can agency tab. six characters. not both. left blank. routes. For details are found at the
appear only A short or long A detailed other modes agency_url, this column
once in the name must be description of a refer to: must be left blank.
routes tab. entered, but route is not https://develo
not both. shown on trip pers.google.co
planners. m/transit/gtfs/
reference#rout
estxt for
others.
This table continues on the next page.

11
Table 5.1 routes Tab (continued)

Field route_color route_text_color route_sort_order continuous_pickup continuous_drop_off


Sample Data FF9999 000000 1 1 1
ff7c4f FFFFFF 2 2 0
Public Facing Yes Yes No No No
Required/Optional Optional Optional Optional Optional Optional
Format Six Character Color Code Six Character Color Code Number Number Number
Notes Establishes the Establishes the route text Establishes the order Indicates if a rider can Indicates if a rider can
background of the route_ color which is displayed routes display when board the vehicle any- alight the vehicle any-
text_color. Must match over the background published as a list. Routes where along the route at where along the route at
public facing colors used color (route_color). with smaller values an intersection of two an intersection of two
at the agency website. Defaults to black display first. roads. roads.
Defaults to blue when (000000) when omitted Valid options are: Valid options are:
omitted or left empty. or left empty. 0 - Continuous stopping 0- Continuous stopping
Select Color Codes here: White is commonly used pickup. drop-off.
https://htmlcolorcodes.c (FFFFFF). 1 or empty - No 1 or empty - No
om Select Color Codes here: continuous pickup. continuous drop-off.
https://htmlcolorcodes.c 2 - Must phone an agency 2 - Must phone an agency
om to arrange continuous to arrange continuous
Feed validation pickup. drop-off.
performed later is the If 0 or 2 are selected, a If 0 or 2 are selected, a
process will confirm the trip shape must be trip shape must be
color contrast meets created. See Section 14 created. See Section 14
accessibility for instructions on for instructions on
requirements. creating a shape file. creating a shape file.
When only a segment or When only a segment or
portion of a trip is flexible portion of a trip is flexible
use the Schedules_V3 use the Schedules_V3
tab. See Section 8. tab. See Section 8.

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

Figure 5-1 Routes Tab Data Displayed on a Trip Plan

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.

6.1.Method 1 – MyMaps and Google Earth


Method 1 is appropriate when more than five stops need to be geocoded. Using Google’s MyMaps to geocode bus stops allows an agency to easily share
bus stop locations with others in the agency and to review or modify stop locations as needed.

1. Create (or access) and log-in to a Google account


2. Go to mymaps.google.com
3. Create a new map and layer
a. Click on the red button “+Create a New Map.”
b. Click on “Untitled Map” and re-name the map “GTFS Bus Stops” (or other title).
c. Click on “Untitled Layer” and re-Name the layer “Stops” (or other title).
d. Click on “Base Map” and select the Satellite view (top middle block).

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.

6.2.Method 2 – Google Earth


In Method 2, bus stop locations are geocoded directly in Google Earth. It is appropriate for five or fewer stops or location updates.

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.

Table 7.1 stops Tab

Field stop_id stop_code stop_name stop_desc stop_lat stop_lon


Hwy 112 at
Sample Data
14_14 3789 Ba’adah Heights St. 48.070021 -124.279060
Hwy 112 at Coast
Guard Road in
16_14 4678 Neah Bay 48.369034 -124.598663
Public Facing No Yes Yes Yes No No
Required/Optional Required Optional Required Optional Required Required
Latitude in decimal Longitude in decimal
degrees accurate to six degrees accurate to six
Format Text Text Text Test decimal places on the decimal places on the
Notes Multiple routes may Unless an agency Name of location Suggest leaving Stop latitude and longitude combine to form the
use the same stop. uses a mobile app, it that precisely this column geocoding or stop coordinate (a point) used to show
It can refer to stops, is recommended matches the name empty. It is not the stop’s exact location on a map. These are
stations or station this column be left published at the published on trip established using Google MyMaps and/or Google
entrances. blank. agency’s website. planners. Earth as described in Section 6.
This table is continued on the next page.

17
Table 7.1 stops Tab (continued)

Field zone_id stop_url location_type parent_station stop_timezone wheelchair_boarding


Sample Data America/Los_Angeles 1
A America/New_York 0
Public Facing No Yes No No Yes Yes
Required/Optional Optional Optional Optional Optional Optional Optional
Format Text URL Number Text Time zone Number
Notes This field is required Valid Options: Use only for stops If the stop is in the Indicates whether
only when fares will 0 or empty: Stop or inside a station, for same time zone as the wheelchair
be published using a Platform (empty is a transfer location agency, then this can boardings are
distance or zone recommended). or for a Transit be left blank. possible. Valid
fare. The zone_id is Center. For list of time zones, options are:
1: Station
used in the refer to this site: 0 or empty - No
fare_rules tab as 2: Station
https://en.wikipedia. accessibility
described in Section Entrance/Exit
org/wiki/List_of_tz_d information for the
13. If the stop is in a 3: Generic Node. A atabase_time_zones stop is available
station or at a location within a
In website and in the 1 - Some vehicles at
station entrance, the station, not
table called List, use this stop can be
zone_id is ignored. matching any other
the TZ database name boarded by a rider in
location_type
shown in the third a wheelchair
4: Boarding Area column. 2 - Wheelchair
boarding is not
possible at this stop

18
Figure 7.1 depicts how the public facing data from the stops tab is depicted on a trip plan.

stop_timezone

stop_name

Figure 7-1 Stops Tab Data Displayed on a Trip Plan

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.

8.1.Enter Schedule Data


1. Open the Schedule Generator file and, if not completed yet, enable macros per the instructions in Section 2 Enable Macros.
2. Go to Schedules_V3 tab.
3. In Row 2
a. Enter the name of the first trip group in column A.
b. For trips that will have defined shapes, enter the shape_id associated with trips starting in column R and all columns to the right in that row
that have a trip shape associated with it. Shapes are optional. Instructions to create trip shapes are described in Section 14 Optional – shapes
Tab.
c. If the trip group is serviced by a vehicle with a wheelchair lift, a “1” can be entered in Column P. Enter once for each trip group.
d. If the trip group is serviced by a vehicle that can accommodate a bicycle, a “1” can be entered in Column Q. Enter once for each trip group.
e. If a block_id for a route is to be included, it is entered in the same cell as the shape_id. Block_ids are generally used when a rider can remain
on a vehicle for inbound and outbound trips or between the last stop on a trip and first stop of the next trip, which may be a different route.
Data must be entered with the shape_id in this format: shape_id:block_id. The block_id name is either generated by scheduling software or
manually. For agencies offering GTFS real-time information, a block_id may be required.
f. No other information is entered in this row.
4. Fill in the remaining data per Table 8.1 and the sample data provided in Table 8.2. Do not leave any cells blank in the trip columns. A blank or empty
cell in the trip rows will stop the trip. When times are unknown, enter an “*” asterisk. The start and end of a trip group cannot use an “*”. Trips may
have blanks for a partial trip that begins below the first stop. Any stops listed below the blank cell will not be shown for that trip.
5. For the next trip group leave a row blank and then, similar to row 2, enter in column A the trip group name (needs to be different for every route
variation) and then the wheelchair, bicycle and corresponding trip shape and block_id information. Then on the following rows repeat step 4.

20
Table 8.1 Schedules_V3 Tab

Field Trip Group route_id service_id direction_id trip_headsign


Public Facing No No No No Yes
Required/Optional Required Required Required Required Optional
Format Text Text Text Number Text
Notes Use the trip group title Must match one of the Must match one of the Indicates the direction of Set to the last stop on
to help define the route_ids listed in the service_ids listed in the travel for a trip. Valid the trip. It is only
service (weekday, routes tab in the calendar tab in the options are: entered in the row with
inbound/ outbound). ImportExport file. Enter ImportExport file. Enter 0 - Travel in one the first stop’s time
All stops must be the route_id in all rows the service _id in all rows direction (outbound). information.
consecutive in a trip where a stop is listed. where a stop is listed. Although optional,
1 - Travel in the opposite
group. Create a new trip direction (inbound). providing the
group when a bus stop is trip_headsign data will
1 - For loop routes
omitted or added on a expedite review by some
trip or a different Enter the direction_id in trip planners.
service_id is used. all rows where a stop is
listed.

This table continues on the next page.

21
Table 8.1 Schedules_V3 Tab (continued)

Field stop_id stop_name stop_headsign pickup_type drop_off_type


Public Facing No No Yes No No
Required/Optional Required Optional Optional Optional Optional
Format Text Text Text Number Number
Notes Must match one of the Match the stop_name It is recommended the Indicates pickup method. Indicates drop off
stop_ids listed in the listed for the stop_id in next stop in the trip be Valid options are: method. Valid options
stops tab in the the previous column. entered in this column. 0 or empty - Regularly are:
ImportExport file. This is easily scheduled pickup. 0 or empty - Regularly
accomplished by linking scheduled drop off.
1 - No pickup available
the cell to the cell
2 - Must phone agency to 1 - No drop off available
located one row down
and one column to the arrange pickup 2 - Must phone agency to
left. This field overrides arrange drop off
the default
trip_headsign. For the
last stop, leave the
stop_headsign blank.
The stop_headsign is
used by the trip planner
to show the next stop.
This table continues on the next page.

22
Table 8.1 Schedules_V3 (continued)

Field continuous_pickup continuous_drop_off timed_stop wait_time timepoint


Public Facing No No No No No
Required/Optional Optional Optional Optional Optional Optional
Format Number Number Number HH:MM:SS AM Number
Notes Indicates whether a Indicates whether a Enter a “1” in every row This is the wait time Indicates if arrival and
rider can board the rider can alight from the with a timed stop. This between when a rider departure times for a
transit vehicle for that transit vehicle for that will allow the file’s arrives and departs a stop are exact or
segment of that trip segment of that trip macro to generate a stop. approximate. If exact,
group at any group at any schedule which can be For a five-minute dwell the bus will not leave
intersection of two intersection of two published on a website. or wait time enter prior to the time shown.
roads, not just at roads, not just at bus Data in this column is 12:05:00 AM. This field also allows a
identified bus stops. The stops. The path is not used in the GTFS. trip planner to provide
path is described by the described by the trip interpolated stop-times,
trip shape, from this shape, from this while indicating that the
stop_time to the next stop_time to the next times are approximate.
stop_time in the trip’s stop_time in the trip’s Valid options are:
stop_sequence. Valid stop_sequence. Valid 0 or empty - Times are
options are: options are: considered
0 - Continuous stopping 0 - Continuous stopping approximate.
pickup. drop off. 1 - Times are considered
1 or empty - No 1 or empty - No exact.
continuous stopping continuous stopping
pickup. drop-off.
2 - Must phone an 2 - Must phone an
agency to arrange agency to arrange drop-
pickup. off.

This table continues on the next page.

23
Table 8.1 Schedules_V3 Tab (continued)

Field wheelchair_accessible bikes_allowed T01 T02 T03


Public Facing No No Yes Yes Yes
Required/Optional Optional Optional Required Optional Optional
Format Number Number HH:MM 1 HH:MM HH:MM
Notes Entered one time for the Entered one time for the For each trip and stop along a route, enter arrival time. Hours range from 0 to
entire trip on the row entire trip on the row 24. However, for times occurring after midnight on the next service day, the
with trip group name. with trip group name. hour value is entered as a value greater than 24. For example, 1:30 a.m. would
Indicates wheelchair Indicates whether bikes be entered as 25:30.
accessibility. Valid are allowed. Valid For each trip, the stops are entered in stop order and stops cannot be skipped.
options are: options are: For stops where the time is unknown, an “*” must be entered. Actual times
0 or empty - No 0 or empty - No bike must be entered for the first and last stops. An “*” cannot be used for the first
accessibility information information for the trip. and last stops.
for the trip. 1 - Vehicle being used A blank or empty cell in these columns will stop the trip. Stops listed below any
1 - Vehicle being used on this particular trip blank cell will not be shown on a trip planner.
on this particular trip can accommodate at
can accommodate at least one bicycle.
least one rider in a 2 - No bicycles are
wheelchair. allowed on this trip.
2 - No riders in There is no guarantee to
wheelchairs can be the rider that the bike
accommodated on this rack will always have a
trip. space and riders know
There is no guarantee to this.
the rider that the
wheelchair
accommodations will
always have a space and
riders know this.

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.

Table 8.2 Schedules_V3 Sample Data

25
8.2.Generate stop_times and trips
In the Schedule Generator file, and Intro.Control tab, under the list of Macros:

1. Click on Clear Calculated Data


2. Click on Generate stop_times & trips.
Data should now be populated in the Schedule Generator file stop_times and trips tabs. Note that in the stop_times tab, data is generated in an odd
format; for example, 10_20_00. Do not revise this format. It is required for the data to publish accurately.

8.3.Generate a Schedule for Agency Website


The Schedule Generator file can be used independently to generate a simple schedule timetable, easily formatted and copied onto an agency’s website.

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.

Table 10.1 feed_info Tab

Field feed_publisher_name feed_publisher_url feed_lang feed_start_date


Sample Data Clallam Transit System https://clallamtransit.com en 20210201
Public Facing Yes Yes No No
Required/Optional Required Required Optional Optional
Format Text URL Language Code YYYYMMDD
Notes This is typically the same This is typically the same as This is typically the same as It is recommended that a start
as the agency_name the agency_url entered in the the agency_lang entered in date be entered that matches the
entered in the agency agency tab. the agency tab. earliest start in the calendar tab.
tab The dataset provides complete
and reliable schedule information
for service in the period from the
beginning of the feed_start_date
day to the end of the
feed_end_date day.
Table is continued on next page.

28
Table 10.1 feed_info Tab (continued)

Field feed_end_date feed_version feed_contact_email feed_contact_url


Sample Data 20220331 202101201 [email protected]
Public Facing No No No No

Required/Optional Optional Optional Optional Optional


Format YYYYMMDD YYYYMMDD Email URL
Notes It is recommended that an end date be entered This is the date the feed was Contact information URL to a form for
that matches the latest end date in the calendar completed and considered for person responsible recommending edits
tab. The dataset provides complete and reliable accurate. It is typically the date for dataset. to this dataset.
schedule information for service in the period the data in all tabs is exported to a
from the beginning of the feed_start_date day text file.
to the end of the feed_end_date day.

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.

12. Create GTFS Text Files and Validate Data


Additional support and a demonstration of the explanations provided in this section are available in this video.

1. Create and Export Text Files


a. In ImportExport file and Notes tab, click on the Export button.
b. The macro will create a subfolder called “feed” in the folder where the ImportExport file is located. The text files created by the macro will be
stored here.
2. Create a Compressed Zip Folder of the GTFS text files.
a. Open the Feed folder and highlight all text files by pressing Ctrl+A.
b. Right click and select “Send to”.
c. Select “Compressed .Zip Folder”.
d. A Compressed .Zip Folder will appear in the Feed folder. The feed folder contains the GTFS data created through GTFS Builder.
3. Confirm the data is correct by using a GTFS validator. There are many validators to choose from. Here is one option:
http://gtfsvalidator.omnimodal.io/upload.
4. Follow the instructions to upload the .zip file and then run the validator.
5. Note any errors and return to the ImportExport file and, if needed the Schedule Generator file, to make any necessary edits and corrections. Repeat
the feed generation and validation process.
A feed will not be accepted by a trip planner if there are “errors”. However, “warnings” may indicate only that data needs adjustment or there are new and/or
unfamiliar columns. Warnings can be ignored. A common warning is that a stop is not being used in any trip. This warning can be ignored. Another common
warning is that travel time between stops exceeds a safe speed. This suggests the time to travel between stops is too fast for the distance covered. The agency,
understanding local conditions, may choose to keep the schedule as is or make an adjustment.

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.

13.1. transfers Tab


Table 13.1 provides sample data, as well as explanatory information for the transfers tab.

Table 13.1 transfers Tab

Field from_stop_id to_stop_id transfer_type min_transfer_time


Sample Data 16_18 16_19 1 120
16_19 16_18 1 180
Public Facing
Required/Optional Required Required Required Optional
Format Text Text Number Number (seconds)
Notes Must match one of the Must match one of the Indicates the type of connection for the Amount of time, in
stop_ids listed in the stops tab. stop_ids listed in the stops specified (from_stop_id, to_stop_id) pair. seconds, available to
Identifies a stop or station tab. Valid options are: permit a transfer between
where routes connect. Identifies a stop or station 0 or empty - Recommended transfer point routes at a specified stop.
where routes connect. between routes. For example, two minutes
Enter each stop_id by travel
would be shown as 120 (2
direction. Do not assume a Enter each stop_id by 1 - Timed transfer point between two
minutes X 60 seconds).
transfer applies to the reverse travel direction. Do not routes. The departing vehicle is expected to
direction. assume it works in reverse. wait for the arriving one and leave sufficient The min_transfer_time
time for a rider to transfer between routes. should be sufficient to
The same stop_id entered for The same stop_id entered
permit a typical rider to
both “from” and “to” indicates for both “from” and “to” 2 - Transfer requires a minimum amount of
move between the two
a location where drivers will indicates a location where time between arrival and departure to
stops, including buffer
wait to guarantee a successful drivers will wait to ensure a connection. The time required to
time to allow for schedule
transfer, even if one trip is guarantee a successful transfer is specified by min_transfer_time.
variance on each route.
running late and the transfer, even if one trip is 3 - Transfers are not possible between
transfer_type is “1”. running late. routes at the location.

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.

Table 13.2 fare_attributes Tab

Field fare_id price currency_type payment_method


Sample Data 100 1.00 USD 0
2 3.50 USD 0
Public Facing No Yes Yes Yes
Required/Optional Required Required Required Required
Format Text Number Currency code
Notes Identifies a fare class. Entered in the unit defined by "USD" for dollars Indicates when the fare must
Each fare_id value can appear currency type. For other currency codes refer be paid. Valid options are:
only once in the A $ sign should not be used. to: 0 - Fare is paid on board.
fare_attributes tab. A fare_id https://en.wikipedia.org/wiki 1 - Fare must be paid before
may apply to multiple routes. /ISO_4217#Active_codes boarding.
This table continues on the next page.

32
Table 13.2 fare_attributes Tab (continued)

Field transfers agency_id transfer_duration


Sample Data 0 CTS
2 TTA 5400
Public Facing
Required/Optional Required Required Optional
Format Text Number (seconds)
Notes Indicates the number of transfers Must match one agency ID listed in the Length of time in seconds before a
permitted on this fare. Valid options are: agency tab. transfer expires. For example, 30 minutes
0 - No transfers permitted on this fare. would be shown as 1800 (30 minutes X 60
seconds).
1 - Riders may transfer once.
2 - Riders may transfer twice.
empty - Unlimited transfers are permitted.

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.

Additional samples of fares rules can available here.

Table 13.3 fare_rules Tab

Field fare_id route_id origin_id destination_id contains_id


Sample Data 100 Rt16
2 TransitP A B
Public Facing
Required/Optional Optional Optional Optional Optional Optional
Format Text Text Text Text Text
Notes Must match one of the Must match one of the Must match one of the Must match one of the Must match one of the
fare_ids listed in the route_ids listed in the zones listed in the stops zones listed in the stops zones listed in the stops
fare_attributes tab. routes tab. tab. tab. 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

Field shape_id shape_pt_lat shape_pt_lon shape_pt_sequence shape_dist_traveled


Sample Data 16NeahBaytoForks 48.368574 -124.624979 1 0
16NeahBaytoForks 48.368565 -124.625208 2 0.010
Public Facing No No No No No
Required/Optional Required Required Required Required Optional
Latitude in decimal Longitude in decimal
degrees accurate to six degrees accurate to six
Format Text decimal places. decimal places. Number Number
Notes Each shape may consist Each data point consists Each data point consists The “sequence” The distance traveled is
of hundreds, or even of a set of coordinates of a set of coordinates establishes the points the distance from the
thousands, of points. (latitude and longitude). (latitude and longitude). location along the shape. first point on the shape.
Each point is assigned Values must increase The first point will
the same shape_id. along the trip but do not always have a value of
need to be consecutive. “0”.

14.2. Check Distance from Shape to Stops


1. To check that the trip shape has a point within 30 meters/100 feet of stops serviced by the trip and for any other shape errors, go to the ImportExport
file.
a. Open the trips tab
b. Double left click inside a data row with the trip shape_id to be checked.
c. Say Yes to Export trip.
d. Select 2 and click on OK.
e. Select OK again.
f. The stop_times tab will automatically display that trip and shape. Check column P for any comments/errors. If no comments/errors appear,
the process is complete. If a comment or error needs to be addressed, immediately follow the next set of steps.
2. Go to Google Earth.
a. Right click on Temporary Places and Paste (control+V).
b. The shape is entered and includes three sublayers (Line, Point and Stops). All should have a check in the adjacent box.

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

Agency Name: ______________________________________________ Staff Contact: ______________________________________________

Guidebook Time Begin Task End Task


Task Section Estimate Date Date Notes
REQUIRED TASKS
If Google Transit is the preferred trip planner, confirm the agency can agree to the Google Licensing
Agreement. 60 min.
Download Google Earth Desktop to the PC for this project 1 15 min.
Configure project folder for macros 1 10 min.
Complete the ImportExport tabs: agency, calendar, calendar dates and routes 2,3,4,5 60 min.
Determine if agency bus stop coordinates are available from other organizations. If so, obtain them. 6 30 min.
If not, identify bus stop coordinates from MyMaps and/or Google Earth. 6 60 min.
Enter bus stop coordinates from MyMaps or Google Earth or file into the ImportExport stop tab. 7 20 min.
Complete the Schedule Generator file Schedules_V3 tab by entering timetable/schedule, stop by 8 30 min.
stop. (per route)
Complete the ImportExport tab: feed_info. 10 5 min.
OPTIONAL TASKS
In the ImportExport file complete the transfers tab. 13 5 min.
In the ImportExport file complete the fares and fare_attributes tabs. 13 20 min.
14 20 min.
Using MyMaps or other tools, create trip shapes. (per shape)
Copy the shape files into the ImportExport shapes tab (by trip) 14 10 min.
Confirm the shape_id is entered in the Schedules_V3 tab 14 5 min.
REQUIRED TASKS
In the Schedule Generator file, using the macro generate stop_times and trips data. 8 2 min.
Copy/paste data in the stop times & trips tabs in Schedule Generator into the similarly named 9
ImportExport file tabs. 2 min.
If shapes were created, calculate distance between stops and shape. 14 10 min.
In the ImportExport file, using the macro, generate GTFS text files. 10 2 min.
Compress (.zip) the text files. 12 2 min.
Validate the .zip & resolve all errors/evaluate warnings 12 10 min.
Upload fully valid GTFS .zip to trip planner 16 10 min.

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.

You might also like