the current implementation is a bit clumsy. It assumes the edge is part of a given route if both the origin and originating and terminating nodes of the edge are in from and to of the shortest path. That works, but only if you are willing to get both directions. Instead i think we need to get pairs of (i, i+1) for each of the nodes in the path, then select edges with those specific origin (i) and destination (i+1) (then take only the lowest impedance edge in case there are multiple edges connecting the same two nodes)
the current implementation is a bit clumsy. It assumes the edge is part of a given route if both the origin and originating and terminating nodes of the edge are in
fromandtoof the shortest path. That works, but only if you are willing to get both directions. Instead i think we need to get pairs of (i, i+1) for each of the nodes in the path, then select edges with those specific origin (i) and destination (i+1) (then take only the lowest impedance edge in case there are multiple edges connecting the same two nodes)