diff --git a/map/transit/transit_display.cpp b/map/transit/transit_display.cpp index 0b224647e8..d706e621f6 100644 --- a/map/transit/transit_display.cpp +++ b/map/transit/transit_display.cpp @@ -285,9 +285,12 @@ void TransitRouteDisplay::ProcessSubroute(vector const & segments, auto const id1 = isTransfer1 ? stop1.GetTransferId() : stop1.GetId(); auto const id2 = isTransfer2 ? stop2.GetTransferId() : stop2.GetId(); - bool const isInverted = id1 > id2; - AddTransitShapes(edge.m_shapeIds, displayInfo.m_shapes, currentColor, isInverted, subroute); + if (id1 != id2) + { + bool const isInverted = id1 > id2; + AddTransitShapes(edge.m_shapeIds, displayInfo.m_shapes, currentColor, isInverted, subroute); + } ASSERT_GREATER(subroute.m_polyline.GetSize(), 1, ()); auto const & p1 = *(subroute.m_polyline.End() - 2); diff --git a/tools/python/transit/transit_graph_generator.py b/tools/python/transit/transit_graph_generator.py index 2b260303b7..859de4bcf8 100755 --- a/tools/python/transit/transit_graph_generator.py +++ b/tools/python/transit/transit_graph_generator.py @@ -261,6 +261,8 @@ class TransitGraphBuilder: node2 = self.stops[line['stop_ids'][i + 1]] id1 = node1.get('transfer_id', node1['id']) id2 = node2.get('transfer_id', node2['id']) + if id1 == id2: + continue seg = tuple(sorted([id1, id2])) if seg not in self.segments: self.segments[seg] = {'guide_points': {id1: set(), id2: set()}}