Converts a feature class to a GTFS stops.txt file for a GTFS public transit dataset.
A file geodatabase feature class is recommended for tool input instead of a shapefile because some field names allowed by the GTFS specification are longer than the maximum of 10 characters allowed for shapefile field names.
The output stops.txt file's stop_lat and stop_lon fields will be populated using the geometry of the input features. If the input feature class contains stop_lat and stop_lon fields, the values in those fields will be ignored.
If GTFS stop locations and attributes need to be edited, use the GTFS Stops To Features tool to import an existing stops.txt file, make edits in the map, and export the edited table back into GTFS format using this tool.
This tool does not do comprehensive data validation. Confirm that the resulting GTFS stops.txt file is valid according to the GTFS specification.
FeaturesToGTFSStops_conversion (in_features, out_gtfs_stops_file)
A point feature class containing transit stop geometries and at least the minimum required GTFS stops.txt file fields except stop_lat and stop_lon.
The output stops.txt file.
The following Python window script demonstrates how to use the FeaturesToGTFSStops function in immediate mode.
import arcpy arcpy.conversion.FeaturesToGTFSStops(r"D:/Data/input.gdb/stops", r"D:/GTFS/stops.txt")
- ArcGIS Desktop Basic: Yes
- ArcGIS Desktop Standard: Yes
- ArcGIS Desktop Advanced: Yes