Trips with the same route_id may have different stopping patterns, such as round-trip or sectional trips.
However, read_routes() returns only one LineString per route if shape is not used.
Cause
Because read_routes() only refers to the first trip related to a route.
Problem
Trips with the same route_id may have different stopping patterns, such as round-trip or sectional trips. However,
read_routes()
returns only one LineString per route if shape is not used.Cause
Because
read_routes()
only refers to the first trip related to a route.trip_id = route["trip_id"].unique()[0]
https://github.com/MIERUNE/gtfs-parser/blob/479af5c941a1280f8d2f4858faaa9dff98145437/gtfs_parser/parse.py#L93-L111Solution
read_routes() should return MultiLineStrings for each route containing LineStrings for each stop pattern.
Related Issue
The performance should also be improved. #1
Sample data
GTFS: Tokyo Toei Bus - ToeiBus-GTFS_20240421.zip