Skip to content

Commit

Permalink
filter consecutive edge duplicates ref #15625
Browse files Browse the repository at this point in the history
Signed-off-by: m-kro <m.barthauer@t-online.de>
  • Loading branch information
m-kro committed Oct 22, 2024
1 parent fa10582 commit 5d8edfc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tools/route/tracemapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ def readLines(traceFile, net, geo):
poiOut.write(' <poi id="%s:%s" x="%s" y="%s"/>\n' % (tid, idx, pos[0], pos[1]))
edges = [e.getID() for e in sumolib.route.mapTrace(
trace, net, *mapOpts) if e.getFunction() != "internal"]
edges = [edge for i, edge in enumerate(edges) if i == 0 or edge != edges[i-1]]
if polyOut is not None and edges:
route2poly.generate_poly(options, net, tid, colorgen(), edges, polyOut)
if edges:
Expand Down

0 comments on commit 5d8edfc

Please sign in to comment.