Features To GTFS Shapes (Public Transit Tools)
Summary
Creates a shapes.txt file for a GTFS public transit dataset based on route line representations created by the Generate Shapes Features From GTFS tool.
The optional GTFS shapes.txt file contains a representation of the geographic paths taken by transit vehicles in a transit system. A good shapes.txt file is important for GTFS-based routing apps to display transit routes correctly on the map. Although many transit agencies generate their shapes.txt files using GPS trackers on their vehicles, other transit agencies lacking this hardware may have trouble creating this file.
This tool, together with the Generate Shapes Features From GTFS tool, allows you to create a shapes.txt file based on the stop, route, and schedule information from an existing GTFS dataset. After running the Generate Shapes Features From GTFS tool to estimate the paths traveled by vehicles in the transit system and fine-tuning the results based on local knowledge, you can run this tool to convert those line features into a new shapes.txt file. The tool also creates a new GTFS stop_times.txt file with the shape_dist_traveled field populated with values corresponding to the new shapes.
Usage
Most of the inputs to this tool should be the outputs from the Generate Shapes Features From GTFS tool. These two tools are intended to be used together.
The
shape_dist_traveledfield in the GTFSstop_times.txtfile indicates how far along a transit line a particular stop is located. For example, if a bus drives 1.5 miles to reach the fifth stop along a route, theshape_dist_traveledvalue for that stop is 1.5. Theshape_dist_traveledfield should increase for each stop along the route. The distance traveled to the fifth stop should be greater than the distance traveled to the fourth stop and less than the distance traveled to the sixth stop, for example.The Features To GTFS Shapes tool uses a linear referencing procedure to calculate the
shape_dist_traveledfield values for stops. In some cases, the values calculated for sequential stops along the route may not be increasing. The tool will produce a warning message indicating which shapes, if any, have this problem. This problem usually occurs when the line geometry of the input shape overlaps itself or contains loops. Consequently, it is important to carefully review and edit the shape lines before running this tool to ensure that the shape lines are as clean and correct as possible. If a bus travels in both directions along the same street and overlaps itself on the centerline, it can help to slightly offset each direction of the shape line to either side of the centerline.
Parameters
| Label | Explanation | Data type |
|---|---|---|
|
Input Shape Lines |
A line feature class representing the GTFS shapes created by running the Generate Shapes Features From GTFS tool. The feature class must contain a |
Feature Layer |
|
Input Shape Stops |
A point feature class representing the GTFS stops associated with each shape created by running the Generate Shapes Features From GTFS tool. If a transit stop is used by multiple shapes, the stop should be duplicated in this feature class for each shape that uses it. The feature class must contain a |
Feature Layer |
|
Input Updated GTFS Trips |
The updated GTFS |
File |
|
Input GTFS Stop Times |
The original |
File |
|
Output GTFS Shapes |
The output GTFS |
File |
|
Output GTFS Stop Times |
The output GTFS |
File |
|
Distance Units (Optional) |
Specifies the distance units to use when populating the
|
String |
Environments
Special cases
- Random number generator
-
Only the seed portion of this environment variable is used. The generator type is ignored.
Licensing information
- Basic: Yes
- Standard: Yes
- Advanced: Yes