pub fn make_stops_and_routes(map: &mut Map, raw_routes: &[RawBusRoute], timer: &mut Timer) {
    timer.start("make transit stops and routes");
    let matcher = Matcher::new(raw_routes, map, timer);

    // TODO I'm assuming the vehicle_pos <-> driving_pos relation is one-to-one...
    let mut pt_to_stop: BTreeMap<(Position, Position), BusStopID> = BTreeMap::new();
    for r in raw_routes {
        if let Err(err) = make_route(map, r, &mut pt_to_stop, &matcher) {
            warn!("Skipping route {} ({}): {}", r.full_name, r.osm_rel_id, err);
        }
    }

    // Remove orphaned bus stops. This messes up the BusStopID indexing.
    for id in map
        .bus_stops
        .keys()
        .filter(|id| map.get_routes_serving_stop(**id).is_empty())
        .cloned()
        .collect::<Vec<_>>()
    {
        map.bus_stops.remove(&id);
        map.lanes
            .get_mut(&id.sidewalk)
            .unwrap()
            .bus_stops
            .remove(&id);
    }

    timer.stop("make transit stops and routes");
}
/// Construct the final model of bus/train stops and routes. This is quite broken currently, so not
/// going to describe how it works.
Construct the final model of bus/train stops and routes. This is quite broken currently, so not
going to describe how it works.
Construct the final model of bus / train stops and routes . This is quite broken currently so not going to describe how it works .
pub fn make_stops_and_routes(map: &mut Map, raw_routes: &[RawBusRoute], timer: &mut Timer) {
    timer.start("make transit stops and routes");
    let matcher = Matcher::new(raw_routes, map, timer);
    // TODO I'm assuming the vehicle_pos <-> driving_pos relation is one-to-one...
    let mut pt_to_stop: BTreeMap<(Position, Position), BusStopID> = BTreeMap::new();
    for r in raw_routes {
        if let Err(err) = make_route(map, r, &mut pt_to_stop, &matcher) {
            warn!("Skipping route {} ({}): {}", r.full_name, r.osm_rel_id, err);
        }
    }
    // Remove orphaned bus stops. This messes up the BusStopID indexing.
    for id in map
        .bus_stops
        .keys()
        .filter(|id| map.get_routes_serving_stop(**id).is_empty())
        .cloned()
        .collect::<Vec<_>>()
    {
        map.bus_stops.remove(&id);
        map.lanes
            .get_mut(&id.sidewalk)
            .unwrap()
            .bus_stops
            .remove(&id);
    }
    timer.stop("make transit stops and routes");
}
pub fn make_stops_and_routes ( map : & mut Map , raw_routes : & [ RawBusRoute ] , timer : & mut Timer ) { timer . start ( " " ) ; let matcher = Matcher :: new ( raw_routes , map , timer ) ; // TODO I'm assuming the vehicle_pos <-> driving_pos relation is one-to-one... let mut pt_to_stop : BTreeMap < ( Position , Position ) , BusStopID > = BTreeMap :: new ( ) ; for r in raw_routes { if let Err ( err ) = make_route ( map , r , & mut pt_to_stop , & matcher ) { warn ! ( " " r full_name r osm_rel_id err ) ; } } // Remove orphaned bus stops. This messes up the BusStopID indexing. for id in map . bus_stops . keys ( ) . filter ( | id | map . get_routes_serving_stop ( * * id ) . is_empty ( ) ) . cloned ( ) . collect :: < Vec < _ > > ( ) { map . bus_stops . remove ( & id ) ; map . lanes . get_mut ( & id . sidewalk ) . unwrap ( ) . bus_stops . remove ( & id ) ; } timer . stop ( " " ) ; }
Construct the final model of bus/train stops and routes.
Construct the final model of bus / train stops and routes .
map
&mut Map
raw_routes
&[RawBusRoute]
timer
&mut Timer