Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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
Expand Down Expand Up @@ -1532,4 +1532,4 @@ def build_trip_shapes_for_viewer(gtfs_dir: str, stops: pd.DataFrame, stop_times:


if __name__ == "__main__":
main()
main()