diff --git a/routing_common/vehicle_model.cpp b/routing_common/vehicle_model.cpp index 00c6645880..f666902aeb 100644 --- a/routing_common/vehicle_model.cpp +++ b/routing_common/vehicle_model.cpp @@ -114,6 +114,13 @@ bool VehicleModel::IsRoad(FeatureType const & f) const bool VehicleModel::IsPassThroughAllowed(FeatureType const & f) const { feature::TypesHolder const types(f); + // Allow pass through additional road types e.g. peer, ferry. + for (uint32_t t : types) + { + auto const addRoadInfoIter = FindRoadType(t); + if (addRoadInfoIter != m_addRoadTypes.cend()) + return true; + } return HasPassThroughType(types); } diff --git a/routing_common/vehicle_model.hpp b/routing_common/vehicle_model.hpp index ece3f0985b..75066e6b89 100644 --- a/routing_common/vehicle_model.hpp +++ b/routing_common/vehicle_model.hpp @@ -47,6 +47,8 @@ public: /// e.g. in Russia roads tagged "highway = service" are not allowed for through passage; /// however, road with this tag can be be used if it is close enough to the start or destination /// point of the route. + /// Roads with additional types e.g. "path = ferry", "vehicle_type = yes" considered as allowed + /// to pass through. virtual bool IsPassThroughAllowed(FeatureType const & f) const = 0; };