-
Notifications
You must be signed in to change notification settings - Fork 0
Create Bus Layers
ccai-cmap edited this page Dec 15, 2025
·
16 revisions
This page describes 3_create_bus_layers.py, which creates bus layers for different scenarios. To use this tool, run
python [path-to-tool].
This script is a translation of the first half of the Generate Transit Files tool in the mhn_programs repository.
Note: Before you run this tool, you MUST have already have run the Export Future Highways tool, so that your output folder already contains MHN_all.gdb.
input
|-- input_years.csv
`-- 1_travel
`-- MHN.gdb
output
`-- 1_travel
`-- MHN_all.gdb
The script runs in two main steps. The first step is not concerned with scenarios, while the second step builds the bus network for a specified set of scenarios.
- A GDB called collapsed_routes.gdb is created.
- Within that GDB, for each transit TOD (1, 2, 3, 4), the bus_base and bus_current feature classes (both GTFS) are partitioned according to the TOD period the runs fall into.
- For each TOD period, similar runs are collapsed / grouped together (similar meaning the runs share the same MODE-ROUTE_ID and have similar stopping patterns), and a representative run is chosen for each group (the run which is longest then earliest). The headway is calculated for each group.
- For representative runs, the corresponding itinerary is imported into the GDB and checked for errors. Itinerary gaps and false links are noted and written to the error file error_file_1.txt.
- We can think of the bus_future feature class as already being in its collapsed state. The corresponding future itineraries are imported and checked for errors the same way as the base/current itineraries, with itinerary gaps and false links being noted and written to the error file error_file_1.txt.
- The park and ride nodes are imported into the GDB.