From 32b7c5c474613402dec4726fe530fc7a412be603 Mon Sep 17 00:00:00 2001 From: Vladimir Byko-Ianko Date: Wed, 21 Dec 2016 16:51:14 +0300 Subject: [RELEASE ONLY] Considering all roundabout as one way roads. --- routing/vehicle_model.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/routing/vehicle_model.cpp b/routing/vehicle_model.cpp index 47724d7313..9176375b34 100644 --- a/routing/vehicle_model.cpp +++ b/routing/vehicle_model.cpp @@ -74,7 +74,17 @@ double VehicleModel::GetMinTypeSpeed(feature::TypesHolder const & types) const bool VehicleModel::IsOneWay(FeatureType const & f) const { - return HasOneWayType(feature::TypesHolder(f)); + // It's a hotfix for release and this code shouldn't be merge to master. + // According to osm documentation on roundabout it's implied that roundabout is one way + // road execpt for rare cases. Only 0.3% (~1200) of roundabout in the world are two-way road. + // (http://wiki.openstreetmap.org/wiki/Tag:junction%3Droundabout) + // It should be processed on map generation stage together with other implied one way features + // rules like: motorway_link (if not set oneway == "no") + // motorway (if not set oneway == "no"). Please see + // https://github.com/mapsme/omim/blob/master/3party/osrm/osrm-backend/profiles/car.lua#L392 + // for further details. + // TODO(@Zverik, @bykoianko) Please process the rules on map generation stage. + return HasOneWayType(feature::TypesHolder(f)) || ftypes::IsRoundAboutChecker::Instance()(f); } bool VehicleModel::HasOneWayType(feature::TypesHolder const & types) const -- cgit v1.2.3