Function openrailwaymap_exporter::statistics::path_length
source · pub fn path_length(graph: &RailwayGraph, edges: &Vec<EdgeId>) -> Option<Length>Expand description
Calculate the total length of the given sequence of edges in the railway network.
Arguments
graph- A reference to theRailwayGraphinstance.edges- AVec<EdgeId>representing the sequence of edges.
Returns
An Option<Length> representing the total length of the given sequence of edges in meters, if all edge IDs are valid.