diff --git a/routing/car_model.cpp b/routing/car_model.cpp index 75b78b93c8..d95185a43d 100644 --- a/routing/car_model.cpp +++ b/routing/car_model.cpp @@ -19,7 +19,6 @@ double constexpr kSpeedSecondaryLinkKMpH = 50.0; double constexpr kSpeedTertiaryKMpH = 40.0; double constexpr kSpeedTertiaryLinkKMpH = 30.0; double constexpr kSpeedResidentialKMpH = 25.0; -double constexpr kSpeedPedestrianKMpH = 25.0; double constexpr kSpeedUnclassifiedKMpH = 25.0; double constexpr kSpeedServiceKMpH = 15.0; double constexpr kSpeedLivingStreetKMpH = 10.0; @@ -42,7 +41,6 @@ routing::VehicleModel::InitListT const s_carLimits = { {{"highway", "tertiary"}, kSpeedTertiaryKMpH}, {{"highway", "tertiary_link"}, kSpeedTertiaryLinkKMpH}, {{"highway", "residential"}, kSpeedResidentialKMpH}, - {{"highway", "pedestrian"}, kSpeedPedestrianKMpH}, {{"highway", "unclassified"}, kSpeedUnclassifiedKMpH}, {{"highway", "service"}, kSpeedServiceKMpH}, {{"highway", "living_street"}, kSpeedLivingStreetKMpH}, diff --git a/routing/geometry.cpp b/routing/geometry.cpp index 73069435d6..6ffb2534fa 100644 --- a/routing/geometry.cpp +++ b/routing/geometry.cpp @@ -58,8 +58,8 @@ RoadGeometry::RoadGeometry(bool oneWay, double speed, Points const & points) void RoadGeometry::Load(IVehicleModel const & vehicleModel, FeatureType const & feature) { - CHECK(vehicleModel.IsRoad(feature), - ("Feature", feature.GetID().m_index, "is not a road in the current vehicle model")); + if (!vehicleModel.IsRoad(feature)) + return; m_isOneWay = vehicleModel.IsOneWay(feature); m_speed = vehicleModel.GetSpeed(feature); diff --git a/routing/index_graph.cpp b/routing/index_graph.cpp index 5772766a2b..aa02358918 100644 --- a/routing/index_graph.cpp +++ b/routing/index_graph.cpp @@ -48,6 +48,13 @@ void IndexGraph::GetNeighboringEdges(Segment const & from, RoadPoint const & rp, vector & edges) { RoadGeometry const & road = m_geometry.GetRoad(rp.GetFeatureId()); + + // Note. It's possible that it's used a map which is built with car_model different from + // car_model in current sources. For example, the map from 12.2016 contained highway==pedestrian + // in car_model but now this type of highways is removed. In such cases |road| has no points. + if (road.GetPointsCount() == 0) + return; + bool const bidirectional = !road.IsOneWay(); if ((isOutgoing || bidirectional) && rp.GetPointId() + 1 < road.GetPointsCount())