diff --git a/main.py b/main.py index 2f9d7a2..628f8e2 100644 --- a/main.py +++ b/main.py @@ -152,6 +152,7 @@ def _in_bbox(self, lat: float, lon: float) -> bool: def way(self, w): tags = {t.k: t.v for t in w.tags} + route_tag = tags.get("route") if self.mode == "road": hw = tags.get("highway") @@ -161,7 +162,6 @@ def way(self, w): oneway = oneway_tag in {"yes", "true", "1"} or self._oneway_default.get(hw, False) or tags.get("junction") == "roundabout" else: # rail rw = tags.get("railway") - route_tag = tags.get("route") is_rail = rw is not None and rw in self.RAIL_TYPES is_ferry = route_tag in self.FERRY_ROUTE_TAG @@ -1532,4 +1532,4 @@ def build_trip_shapes_for_viewer(gtfs_dir: str, stops: pd.DataFrame, stop_times: if __name__ == "__main__": - main() \ No newline at end of file + main()