Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLev Dragunov <l.dragunov@corp.mail.ru>2016-01-14 15:41:39 +0300
committerLev Dragunov <l.dragunov@corp.mail.ru>2016-01-14 15:41:39 +0300
commit68dad62d37e9c54861bc66bdc84caf56a975edab (patch)
tree630fdb4dd9598904f6ed8f6c02b1581f55525ad3 /routing/pedestrian_model.cpp
parent839a00918e8a639ad94a2c7a7d4ee1bdf69c000b (diff)
Pedestrian models review fix.
Diffstat (limited to 'routing/pedestrian_model.cpp')
-rw-r--r--routing/pedestrian_model.cpp31
1 files changed, 28 insertions, 3 deletions
diff --git a/routing/pedestrian_model.cpp b/routing/pedestrian_model.cpp
index e131343bbb..385353328c 100644
--- a/routing/pedestrian_model.cpp
+++ b/routing/pedestrian_model.cpp
@@ -72,6 +72,32 @@ routing::VehicleModel::InitListT const s_pedestrianLimits_Default =
{ {"highway", "platform"}, kSpeedPlatformKMpH }, // *
};
+// All options available.
+routing::VehicleModel::InitListT const s_pedestrianLimits_All =
+{
+ { {"highway", "trunk"}, kSpeedPedestrianKMpH },
+ { {"highway", "trunk_link"}, kSpeedPedestrianKMpH },
+ { {"highway", "primary"}, kSpeedPedestrianKMpH },
+ { {"highway", "primary_link"}, kSpeedPedestrianKMpH },
+ { {"highway", "secondary"}, kSpeedPedestrianKMpH },
+ { {"highway", "secondary_link"}, kSpeedPedestrianKMpH },
+ { {"highway", "tertiary"}, kSpeedPedestrianKMpH },
+ { {"highway", "tertiary_link"}, kSpeedPedestrianKMpH },
+ { {"highway", "service"}, kSpeedPedestrianKMpH },
+ { {"highway", "unclassified"}, kSpeedPedestrianKMpH },
+ { {"highway", "road"}, kSpeedPedestrianKMpH },
+ { {"highway", "track"}, kSpeedPedestrianKMpH },
+ { {"highway", "path"}, kSpeedPedestrianKMpH },
+ { {"highway", "bridleway"}, kSpeedPedestrianKMpH },
+ { {"highway", "cycleway"}, kSpeedPedestrianKMpH },
+ { {"highway", "residential"}, kSpeedPedestrianKMpH },
+ { {"highway", "living_street"}, kSpeedPedestrianKMpH },
+ { {"highway", "steps"}, kSpeedPedestrianKMpH },
+ { {"highway", "pedestrian"}, kSpeedPedestrianKMpH },
+ { {"highway", "footway"}, kSpeedPedestrianKMpH },
+ { {"highway", "platform"}, kSpeedPedestrianKMpH },
+};
+
// Australia
routing::VehicleModel::InitListT const s_pedestrianLimits_Australia =
{
@@ -579,10 +605,9 @@ routing::VehicleModel::InitListT const s_pedestrianLimits_USA =
namespace routing
{
-// Use Australia limits because it has all track types availible for pedestrian.
// If one of feature types will be disabled for pedestrian, features of this type will be simplyfied
// in generator. Look FeatureBuilder1::IsRoad() for more details.
-PedestrianModel::PedestrianModel() : VehicleModel(classif(), s_pedestrianLimits_Australia)
+PedestrianModel::PedestrianModel() : VehicleModel(classif(), s_pedestrianLimits_All)
{
Init();
}
@@ -632,7 +657,7 @@ double PedestrianModel::GetSpeed(FeatureType const & f) const
PedestrianModelFactory::PedestrianModelFactory()
{
- m_models[string()] = make_shared<PedestrianModel>();
+ m_models[string()] = make_shared<PedestrianModel>(s_pedestrianLimits_Default);
m_models["Australia"] = make_shared<PedestrianModel>(s_pedestrianLimits_Australia);
m_models["Austria"] = make_shared<PedestrianModel>(s_pedestrianLimits_Austria);
m_models["Belarus"] = make_shared<PedestrianModel>(s_pedestrianLimits_Belarus);