Considering all roundabout as one way roads.

This commit is contained in:
Vladimir Byko-Ianko 2016-12-21 16:51:14 +03:00
parent 4a33e70cab
commit 24a2cf99dd

View file

@ -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