Filter: Verweise auf nicht kopierte Streckenverläufe leeren (OVapi-Fahrpläne)
Sonst bricht pfaedle mit 'no shape with id' ab. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01X48pE4bzjHej8w9HyZXCjb
This commit is contained in:
@@ -137,6 +137,9 @@ def filter_rail(zip_path: Path, out: Path, version: str | None = None) -> dict:
|
||||
|
||||
h, rd = rows(z, "trips.txt")
|
||||
trips = [r for r in rd if r[h.index("route_id")] in route_ids]
|
||||
if "shape_id" in h: # shapes.txt kopieren wir nicht (pfaedle rechnet neu) -> Verweise leeren (z. B. OVapi)
|
||||
for r in trips:
|
||||
r[h.index("shape_id")] = ""
|
||||
write_csv(out / "trips.txt", h, trips)
|
||||
trip_ids = {r[h.index("trip_id")] for r in trips}
|
||||
service_ids = {r[h.index("service_id")] for r in trips}
|
||||
|
||||
Reference in New Issue
Block a user