Review fixes

This commit is contained in:
tatiana-kondakova 2017-07-25 12:46:33 +03:00 committed by Добрый Ээх
parent 3a44826efd
commit 845e41699a
4 changed files with 176 additions and 179 deletions

View file

@ -14,8 +14,7 @@ namespace
// http://wiki.openstreetmap.org/wiki/OSM_tags_for_routing/Access-Restrictions
// Document contains proposals for some countries, but we assume that some kinds of roads are ready for bicycle routing,
// but not listed in tables in the document. For example, steps are not listed, paths, roads and services features also
// can be treated as ready for bicycle routing.
// Kinds of roads which we assume are ready for bicycles are marked by // * below.
// can be treated as ready for bicycle routing. These road types were added to lists below.
// See road types here:
// http://wiki.openstreetmap.org/wiki/Key:highway
@ -60,16 +59,16 @@ routing::VehicleModel::InitListT const g_bicycleLimitsDefault =
{ {"highway", "secondary_link"}, kSpeedSecondaryLinkKMpH, true },
{ {"highway", "tertiary"}, kSpeedTertiaryKMpH, true },
{ {"highway", "tertiary_link"}, kSpeedTertiaryLinkKMpH, true },
{ {"highway", "service"}, kSpeedServiceKMpH, true }, // *
{ {"highway", "service"}, kSpeedServiceKMpH, true },
{ {"highway", "unclassified"}, kSpeedUnclassifiedKMpH, true },
{ {"highway", "road"}, kSpeedRoadKMpH, true },
{ {"highway", "track"}, kSpeedTrackKMpH, true }, // *
{ {"highway", "track"}, kSpeedTrackKMpH, true },
{ {"highway", "path"}, kSpeedPathKMpH, true },
{ {"highway", "cycleway"}, kSpeedCyclewayKMpH, true },
{ {"highway", "residential"}, kSpeedResidentialKMpH, true },
{ {"highway", "living_street"}, kSpeedLivingStreetKMpH, true },
{ {"highway", "steps"}, kSpeedStepsKMpH, true }, // *
{ {"highway", "platform"}, kSpeedPlatformKMpH, true }, // *
{ {"highway", "steps"}, kSpeedStepsKMpH, true },
{ {"highway", "platform"}, kSpeedPlatformKMpH, true },
};
// All options available.
@ -109,19 +108,19 @@ routing::VehicleModel::InitListT const g_bicycleLimitsAustralia =
{ {"highway", "secondary_link"}, kSpeedSecondaryLinkKMpH, true },
{ {"highway", "tertiary"}, kSpeedTertiaryKMpH, true },
{ {"highway", "tertiary_link"}, kSpeedTertiaryLinkKMpH, true },
{ {"highway", "service"}, kSpeedServiceKMpH, true }, // *
{ {"highway", "service"}, kSpeedServiceKMpH, true },
{ {"highway", "unclassified"}, kSpeedUnclassifiedKMpH, true },
{ {"highway", "road"}, kSpeedRoadKMpH, true },
{ {"highway", "track"}, kSpeedTrackKMpH, true }, // *
{ {"highway", "path"}, kSpeedPathKMpH, true }, // *
{ {"highway", "track"}, kSpeedTrackKMpH, true },
{ {"highway", "path"}, kSpeedPathKMpH, true },
{ {"highway", "bridleway"}, kSpeedBridlewayKMpH, true },
{ {"highway", "cycleway"}, kSpeedCyclewayKMpH, true },
{ {"highway", "residential"}, kSpeedResidentialKMpH, true },
{ {"highway", "living_street"}, kSpeedLivingStreetKMpH, true },
{ {"highway", "steps"}, kSpeedStepsKMpH, true }, // *
{ {"highway", "steps"}, kSpeedStepsKMpH, true },
{ {"highway", "pedestrian"}, kSpeedPedestrianKMpH, true },
{ {"highway", "footway"}, kSpeedFootwayKMpH, true },
{ {"highway", "platform"}, kSpeedPlatformKMpH, true }, // *
{ {"highway", "platform"}, kSpeedPlatformKMpH, true },
};
// Austria
@ -140,8 +139,8 @@ routing::VehicleModel::InitListT const g_bicycleLimitsAustria =
{ {"highway", "cycleway"}, kSpeedCyclewayKMpH, true },
{ {"highway", "residential"}, kSpeedResidentialKMpH, true },
{ {"highway", "living_street"}, kSpeedLivingStreetKMpH, true },
{ {"highway", "steps"}, kSpeedStepsKMpH, true }, // *
{ {"highway", "platform"}, kSpeedPlatformKMpH, true }, // *
{ {"highway", "steps"}, kSpeedStepsKMpH, true },
{ {"highway", "platform"}, kSpeedPlatformKMpH, true },
};
// Belarus
@ -155,18 +154,18 @@ routing::VehicleModel::InitListT const g_bicycleLimitsBelarus =
{ {"highway", "secondary_link"}, kSpeedSecondaryLinkKMpH, true },
{ {"highway", "tertiary"}, kSpeedTertiaryKMpH, true },
{ {"highway", "tertiary_link"}, kSpeedTertiaryLinkKMpH, true },
{ {"highway", "service"}, kSpeedServiceKMpH, true }, // *
{ {"highway", "service"}, kSpeedServiceKMpH, true },
{ {"highway", "unclassified"}, kSpeedUnclassifiedKMpH, true },
{ {"highway", "road"}, kSpeedRoadKMpH, true }, // *
{ {"highway", "track"}, kSpeedTrackKMpH, true }, // *
{ {"highway", "path"}, kSpeedPathKMpH, true }, // *
{ {"highway", "road"}, kSpeedRoadKMpH, true },
{ {"highway", "track"}, kSpeedTrackKMpH, true },
{ {"highway", "path"}, kSpeedPathKMpH, true },
{ {"highway", "cycleway"}, kSpeedCyclewayKMpH, true },
{ {"highway", "residential"}, kSpeedResidentialKMpH, true },
{ {"highway", "living_street"}, kSpeedLivingStreetKMpH, true },
{ {"highway", "steps"}, kSpeedStepsKMpH, true }, // *
{ {"highway", "steps"}, kSpeedStepsKMpH, true },
{ {"highway", "pedestrian"}, kSpeedPedestrianKMpH, true },
{ {"highway", "footway"}, kSpeedFootwayKMpH, true },
{ {"highway", "platform"}, kSpeedPlatformKMpH, true }, // *
{ {"highway", "platform"}, kSpeedPlatformKMpH, true },
};
// Belgium
@ -180,15 +179,15 @@ routing::VehicleModel::InitListT const g_bicycleLimitsBelgium =
{ {"highway", "tertiary_link"}, kSpeedTertiaryLinkKMpH, true },
{ {"highway", "service"}, kSpeedServiceKMpH, true },
{ {"highway", "unclassified"}, kSpeedUnclassifiedKMpH, true },
{ {"highway", "road"}, kSpeedRoadKMpH, true }, // *
{ {"highway", "road"}, kSpeedRoadKMpH, true },
{ {"highway", "track"}, kSpeedTrackKMpH, true },
{ {"highway", "path"}, kSpeedPathKMpH, true },
{ {"highway", "cycleway"}, kSpeedCyclewayKMpH, true },
{ {"highway", "residential"}, kSpeedResidentialKMpH, true }, // *
{ {"highway", "living_street"}, kSpeedLivingStreetKMpH, true }, // *
{ {"highway", "steps"}, kSpeedStepsKMpH, true }, // *
{ {"highway", "residential"}, kSpeedResidentialKMpH, true },
{ {"highway", "living_street"}, kSpeedLivingStreetKMpH, true },
{ {"highway", "steps"}, kSpeedStepsKMpH, true },
{ {"highway", "pedestrian"}, kSpeedPedestrianKMpH, true },
{ {"highway", "platform"}, kSpeedPlatformKMpH, true }, // *
{ {"highway", "platform"}, kSpeedPlatformKMpH, true },
};
// Brazil
@ -202,19 +201,19 @@ routing::VehicleModel::InitListT const g_bicycleLimitsBrazil =
{ {"highway", "secondary_link"}, kSpeedSecondaryLinkKMpH, true },
{ {"highway", "tertiary"}, kSpeedTertiaryKMpH, true },
{ {"highway", "tertiary_link"}, kSpeedTertiaryLinkKMpH, true },
{ {"highway", "service"}, kSpeedServiceKMpH, true }, // *
{ {"highway", "service"}, kSpeedServiceKMpH, true },
{ {"highway", "unclassified"}, kSpeedUnclassifiedKMpH, true },
{ {"highway", "road"}, kSpeedRoadKMpH, true },
{ {"highway", "track"}, kSpeedTrackKMpH, true }, // *
{ {"highway", "track"}, kSpeedTrackKMpH, true },
{ {"highway", "path"}, kSpeedPathKMpH, true },
{ {"highway", "bridleway"}, kSpeedBridlewayKMpH, true },
{ {"highway", "cycleway"}, kSpeedCyclewayKMpH, true },
{ {"highway", "residential"}, kSpeedResidentialKMpH, true },
{ {"highway", "living_street"}, kSpeedLivingStreetKMpH, true },
{ {"highway", "steps"}, kSpeedStepsKMpH, true }, // *
{ {"highway", "steps"}, kSpeedStepsKMpH, true },
{ {"highway", "pedestrian"}, kSpeedPedestrianKMpH, true },
{ {"highway", "footway"}, kSpeedFootwayKMpH, true },
{ {"highway", "platform"}, kSpeedPlatformKMpH, true }, // *
{ {"highway", "platform"}, kSpeedPlatformKMpH, true },
};
// Denmark
@ -226,16 +225,16 @@ routing::VehicleModel::InitListT const g_bicycleLimitsDenmark =
{ {"highway", "secondary_link"}, kSpeedSecondaryLinkKMpH, true },
{ {"highway", "tertiary"}, kSpeedTertiaryKMpH, true },
{ {"highway", "tertiary_link"}, kSpeedTertiaryLinkKMpH, true },
{ {"highway", "service"}, kSpeedServiceKMpH, true }, // *
{ {"highway", "service"}, kSpeedServiceKMpH, true },
{ {"highway", "unclassified"}, kSpeedUnclassifiedKMpH, true },
{ {"highway", "road"}, kSpeedRoadKMpH, true }, // *
{ {"highway", "road"}, kSpeedRoadKMpH, true },
{ {"highway", "track"}, kSpeedTrackKMpH, true },
{ {"highway", "path"}, kSpeedPathKMpH, true },
{ {"highway", "cycleway"}, kSpeedCyclewayKMpH, true },
{ {"highway", "residential"}, kSpeedResidentialKMpH, true },
{ {"highway", "living_street"}, kSpeedLivingStreetKMpH, true },
{ {"highway", "steps"}, kSpeedStepsKMpH, true }, // *
{ {"highway", "platform"}, kSpeedPlatformKMpH, true }, // *
{ {"highway", "steps"}, kSpeedStepsKMpH, true },
{ {"highway", "platform"}, kSpeedPlatformKMpH, true },
};
// France
@ -247,17 +246,17 @@ routing::VehicleModel::InitListT const g_bicycleLimitsFrance =
{ {"highway", "secondary_link"}, kSpeedSecondaryLinkKMpH, true },
{ {"highway", "tertiary"}, kSpeedTertiaryKMpH, true },
{ {"highway", "tertiary_link"}, kSpeedTertiaryLinkKMpH, true },
{ {"highway", "service"}, kSpeedServiceKMpH, true }, // *
{ {"highway", "service"}, kSpeedServiceKMpH, true },
{ {"highway", "unclassified"}, kSpeedUnclassifiedKMpH, true },
{ {"highway", "road"}, kSpeedRoadKMpH, true }, // *
{ {"highway", "road"}, kSpeedRoadKMpH, true },
{ {"highway", "track"}, kSpeedTrackKMpH, true },
{ {"highway", "path"}, kSpeedPathKMpH, true },
{ {"highway", "cycleway"}, kSpeedCyclewayKMpH, true },
{ {"highway", "residential"}, kSpeedResidentialKMpH, true },
{ {"highway", "living_street"}, kSpeedLivingStreetKMpH, true },
{ {"highway", "steps"}, kSpeedStepsKMpH, true }, // *
{ {"highway", "steps"}, kSpeedStepsKMpH, true },
{ {"highway", "pedestrian"}, kSpeedPedestrianKMpH, true },
{ {"highway", "platform"}, kSpeedPlatformKMpH, true }, // *
{ {"highway", "platform"}, kSpeedPlatformKMpH, true },
};
// Finland
@ -271,9 +270,9 @@ routing::VehicleModel::InitListT const g_bicycleLimitsFinland =
{ {"highway", "secondary_link"}, kSpeedSecondaryLinkKMpH, true },
{ {"highway", "tertiary"}, kSpeedTertiaryKMpH, true },
{ {"highway", "tertiary_link"}, kSpeedTertiaryLinkKMpH, true },
{ {"highway", "service"}, kSpeedServiceKMpH, true }, // *
{ {"highway", "service"}, kSpeedServiceKMpH, true },
{ {"highway", "unclassified"}, kSpeedUnclassifiedKMpH, true },
{ {"highway", "road"}, kSpeedRoadKMpH, true }, // *
{ {"highway", "road"}, kSpeedRoadKMpH, true },
{ {"highway", "track"}, kSpeedTrackKMpH, true },
{ {"highway", "path"}, kSpeedPathKMpH, true },
{ {"highway", "cycleway"}, kSpeedCyclewayKMpH, true },
@ -281,7 +280,7 @@ routing::VehicleModel::InitListT const g_bicycleLimitsFinland =
{ {"highway", "living_street"}, kSpeedLivingStreetKMpH, true },
{ {"highway", "steps"}, kSpeedStepsKMpH, true },
{ {"highway", "pedestrian"}, kSpeedPedestrianKMpH, true },
{ {"highway", "platform"}, kSpeedPlatformKMpH, true }, // *
{ {"highway", "platform"}, kSpeedPlatformKMpH, true },
};
// Germany
@ -295,7 +294,7 @@ routing::VehicleModel::InitListT const g_bicycleLimitsGermany =
{ {"highway", "secondary_link"}, kSpeedSecondaryLinkKMpH, true },
{ {"highway", "tertiary"}, kSpeedTertiaryKMpH, true },
{ {"highway", "tertiary_link"}, kSpeedTertiaryLinkKMpH, true },
{ {"highway", "service"}, kSpeedServiceKMpH, true }, // *
{ {"highway", "service"}, kSpeedServiceKMpH, true },
{ {"highway", "unclassified"}, kSpeedUnclassifiedKMpH, true },
{ {"highway", "road"}, kSpeedRoadKMpH, true },
{ {"highway", "track"}, kSpeedTrackKMpH, true },
@ -303,8 +302,8 @@ routing::VehicleModel::InitListT const g_bicycleLimitsGermany =
{ {"highway", "cycleway"}, kSpeedCyclewayKMpH, true },
{ {"highway", "residential"}, kSpeedResidentialKMpH, true },
{ {"highway", "living_street"}, kSpeedLivingStreetKMpH, true },
{ {"highway", "steps"}, kSpeedStepsKMpH, true }, // *
{ {"highway", "platform"}, kSpeedPlatformKMpH, true }, // *
{ {"highway", "steps"}, kSpeedStepsKMpH, true },
{ {"highway", "platform"}, kSpeedPlatformKMpH, true },
};
// Hungary
@ -316,16 +315,16 @@ routing::VehicleModel::InitListT const g_bicycleLimitsHungary =
{ {"highway", "secondary_link"}, kSpeedSecondaryLinkKMpH, true },
{ {"highway", "tertiary"}, kSpeedTertiaryKMpH, true },
{ {"highway", "tertiary_link"}, kSpeedTertiaryLinkKMpH, true },
{ {"highway", "service"}, kSpeedServiceKMpH, true }, // *
{ {"highway", "service"}, kSpeedServiceKMpH, true },
{ {"highway", "unclassified"}, kSpeedUnclassifiedKMpH, true },
{ {"highway", "road"}, kSpeedRoadKMpH, true },
{ {"highway", "track"}, kSpeedTrackKMpH, true }, // *
{ {"highway", "path"}, kSpeedPathKMpH, true }, // *
{ {"highway", "track"}, kSpeedTrackKMpH, true },
{ {"highway", "path"}, kSpeedPathKMpH, true },
{ {"highway", "cycleway"}, kSpeedCyclewayKMpH, true },
{ {"highway", "residential"}, kSpeedResidentialKMpH, true },
{ {"highway", "living_street"}, kSpeedLivingStreetKMpH, true },
{ {"highway", "steps"}, kSpeedStepsKMpH, true }, // *
{ {"highway", "platform"}, kSpeedPlatformKMpH, true }, // *
{ {"highway", "steps"}, kSpeedStepsKMpH, true },
{ {"highway", "platform"}, kSpeedPlatformKMpH, true },
};
// Netherlands
@ -337,7 +336,7 @@ routing::VehicleModel::InitListT const g_bicycleLimitsNetherlands =
{ {"highway", "secondary_link"}, kSpeedSecondaryLinkKMpH, true },
{ {"highway", "tertiary"}, kSpeedTertiaryKMpH, true },
{ {"highway", "tertiary_link"}, kSpeedTertiaryLinkKMpH, true },
{ {"highway", "service"}, kSpeedServiceKMpH, true }, // *
{ {"highway", "service"}, kSpeedServiceKMpH, true },
{ {"highway", "unclassified"}, kSpeedUnclassifiedKMpH, true },
{ {"highway", "road"}, kSpeedRoadKMpH, true },
{ {"highway", "track"}, kSpeedTrackKMpH, true },
@ -345,8 +344,8 @@ routing::VehicleModel::InitListT const g_bicycleLimitsNetherlands =
{ {"highway", "cycleway"}, kSpeedCyclewayKMpH, true },
{ {"highway", "residential"}, kSpeedResidentialKMpH, true },
{ {"highway", "living_street"}, kSpeedLivingStreetKMpH, true },
{ {"highway", "steps"}, kSpeedStepsKMpH, true }, // *
{ {"highway", "platform"}, kSpeedPlatformKMpH, true }, // *
{ {"highway", "steps"}, kSpeedStepsKMpH, true },
{ {"highway", "platform"}, kSpeedPlatformKMpH, true },
};
// Norway
@ -360,7 +359,7 @@ routing::VehicleModel::InitListT const g_bicycleLimitsNorway =
{ {"highway", "secondary_link"}, kSpeedSecondaryLinkKMpH, true },
{ {"highway", "tertiary"}, kSpeedTertiaryKMpH, true },
{ {"highway", "tertiary_link"}, kSpeedTertiaryLinkKMpH, true },
{ {"highway", "service"}, kSpeedServiceKMpH, true }, // *
{ {"highway", "service"}, kSpeedServiceKMpH, true },
{ {"highway", "unclassified"}, kSpeedUnclassifiedKMpH, true },
{ {"highway", "road"}, kSpeedRoadKMpH, true },
{ {"highway", "track"}, kSpeedTrackKMpH, true },
@ -369,10 +368,10 @@ routing::VehicleModel::InitListT const g_bicycleLimitsNorway =
{ {"highway", "cycleway"}, kSpeedCyclewayKMpH, true },
{ {"highway", "residential"}, kSpeedResidentialKMpH, true },
{ {"highway", "living_street"}, kSpeedLivingStreetKMpH, true },
{ {"highway", "steps"}, kSpeedStepsKMpH, true }, // *
{ {"highway", "steps"}, kSpeedStepsKMpH, true },
{ {"highway", "pedestrian"}, kSpeedPedestrianKMpH, true },
{ {"highway", "footway"}, kSpeedFootwayKMpH, true },
{ {"highway", "platform"}, kSpeedPlatformKMpH, true }, // *
{ {"highway", "platform"}, kSpeedPlatformKMpH, true },
};
// Poland
@ -384,16 +383,16 @@ routing::VehicleModel::InitListT const g_bicycleLimitsPoland =
{ {"highway", "secondary_link"}, kSpeedSecondaryLinkKMpH, true },
{ {"highway", "tertiary"}, kSpeedTertiaryKMpH, true },
{ {"highway", "tertiary_link"}, kSpeedTertiaryLinkKMpH, true },
{ {"highway", "service"}, kSpeedServiceKMpH, true }, // *
{ {"highway", "service"}, kSpeedServiceKMpH, true },
{ {"highway", "unclassified"}, kSpeedUnclassifiedKMpH, true },
{ {"highway", "road"}, kSpeedRoadKMpH, true },
{ {"highway", "track"}, kSpeedTrackKMpH, true }, // *
{ {"highway", "track"}, kSpeedTrackKMpH, true },
{ {"highway", "path"}, kSpeedPathKMpH, true },
{ {"highway", "cycleway"}, kSpeedCyclewayKMpH, true },
{ {"highway", "residential"}, kSpeedResidentialKMpH, true },
{ {"highway", "living_street"}, kSpeedLivingStreetKMpH, true },
{ {"highway", "steps"}, kSpeedStepsKMpH, true }, // *
{ {"highway", "platform"}, kSpeedPlatformKMpH, true }, // *
{ {"highway", "steps"}, kSpeedStepsKMpH, true },
{ {"highway", "platform"}, kSpeedPlatformKMpH, true },
};
// Romania
@ -405,7 +404,7 @@ routing::VehicleModel::InitListT const g_bicycleLimitsRomania =
{ {"highway", "secondary_link"}, kSpeedSecondaryLinkKMpH, true },
{ {"highway", "tertiary"}, kSpeedTertiaryKMpH, true },
{ {"highway", "tertiary_link"}, kSpeedTertiaryLinkKMpH, true },
{ {"highway", "service"}, kSpeedServiceKMpH, true }, // *
{ {"highway", "service"}, kSpeedServiceKMpH, true },
{ {"highway", "unclassified"}, kSpeedUnclassifiedKMpH, true },
{ {"highway", "road"}, kSpeedRoadKMpH, true },
{ {"highway", "track"}, kSpeedTrackKMpH, true },
@ -413,8 +412,8 @@ routing::VehicleModel::InitListT const g_bicycleLimitsRomania =
{ {"highway", "cycleway"}, kSpeedCyclewayKMpH, true },
{ {"highway", "residential"}, kSpeedResidentialKMpH, true },
{ {"highway", "living_street"}, kSpeedLivingStreetKMpH, true },
{ {"highway", "steps"}, kSpeedStepsKMpH, true }, // *
{ {"highway", "platform"}, kSpeedPlatformKMpH, true }, // *
{ {"highway", "steps"}, kSpeedStepsKMpH, true },
{ {"highway", "platform"}, kSpeedPlatformKMpH, true },
};
// Russia
@ -431,15 +430,15 @@ routing::VehicleModel::InitListT const g_bicycleLimitsRussia =
{ {"highway", "service"}, kSpeedServiceKMpH, false },
{ {"highway", "unclassified"}, kSpeedUnclassifiedKMpH, true },
{ {"highway", "road"}, kSpeedRoadKMpH, true },
{ {"highway", "track"}, kSpeedTrackKMpH, true }, // *
{ {"highway", "track"}, kSpeedTrackKMpH, true },
{ {"highway", "path"}, kSpeedPathKMpH, true },
{ {"highway", "cycleway"}, kSpeedCyclewayKMpH, true },
{ {"highway", "residential"}, kSpeedResidentialKMpH, true },
{ {"highway", "living_street"}, kSpeedLivingStreetKMpH, false },
{ {"highway", "steps"}, kSpeedStepsKMpH, true }, // *
{ {"highway", "steps"}, kSpeedStepsKMpH, true },
{ {"highway", "pedestrian"}, kSpeedPedestrianKMpH, true },
{ {"highway", "footway"}, kSpeedPedestrianKMpH, true },
{ {"highway", "platform"}, kSpeedPlatformKMpH, true }, // *
{ {"highway", "platform"}, kSpeedPlatformKMpH, true },
};
// Slovakia
@ -451,16 +450,16 @@ routing::VehicleModel::InitListT const g_bicycleLimitsSlovakia =
{ {"highway", "secondary_link"}, kSpeedSecondaryLinkKMpH, true },
{ {"highway", "tertiary"}, kSpeedTertiaryKMpH, true },
{ {"highway", "tertiary_link"}, kSpeedTertiaryLinkKMpH, true },
{ {"highway", "service"}, kSpeedServiceKMpH, true }, // *
{ {"highway", "service"}, kSpeedServiceKMpH, true },
{ {"highway", "unclassified"}, kSpeedUnclassifiedKMpH, true },
{ {"highway", "road"}, kSpeedRoadKMpH, true },
{ {"highway", "track"}, kSpeedTrackKMpH, true }, // *
{ {"highway", "track"}, kSpeedTrackKMpH, true },
{ {"highway", "path"}, kSpeedPathKMpH, true },
{ {"highway", "cycleway"}, kSpeedCyclewayKMpH, true },
{ {"highway", "residential"}, kSpeedResidentialKMpH, true },
{ {"highway", "living_street"}, kSpeedLivingStreetKMpH, true },
{ {"highway", "steps"}, kSpeedStepsKMpH, true }, // *
{ {"highway", "platform"}, kSpeedPlatformKMpH, true }, // *
{ {"highway", "steps"}, kSpeedStepsKMpH, true },
{ {"highway", "platform"}, kSpeedPlatformKMpH, true },
};
// Switzerland
@ -472,7 +471,7 @@ routing::VehicleModel::InitListT const g_bicycleLimitsSwitzerland =
{ {"highway", "secondary_link"}, kSpeedSecondaryLinkKMpH, true },
{ {"highway", "tertiary"}, kSpeedTertiaryKMpH, true },
{ {"highway", "tertiary_link"}, kSpeedTertiaryLinkKMpH, true },
{ {"highway", "service"}, kSpeedServiceKMpH, true }, // *
{ {"highway", "service"}, kSpeedServiceKMpH, true },
{ {"highway", "unclassified"}, kSpeedUnclassifiedKMpH, true },
{ {"highway", "road"}, kSpeedRoadKMpH, true },
{ {"highway", "track"}, kSpeedTrackKMpH, true },
@ -480,10 +479,10 @@ routing::VehicleModel::InitListT const g_bicycleLimitsSwitzerland =
{ {"highway", "cycleway"}, kSpeedCyclewayKMpH, true },
{ {"highway", "residential"}, kSpeedResidentialKMpH, true },
{ {"highway", "living_street"}, kSpeedLivingStreetKMpH, true },
{ {"highway", "steps"}, kSpeedStepsKMpH, true }, // *
{ {"highway", "steps"}, kSpeedStepsKMpH, true },
{ {"highway", "pedestrian"}, kSpeedPedestrianKMpH, true },
{ {"highway", "footway"}, kSpeedFootwayKMpH, true },
{ {"highway", "platform"}, kSpeedPlatformKMpH, true }, // *
{ {"highway", "platform"}, kSpeedPlatformKMpH, true },
};
// Turkey
@ -497,16 +496,16 @@ routing::VehicleModel::InitListT const g_bicycleLimitsTurkey =
{ {"highway", "secondary_link"}, kSpeedSecondaryLinkKMpH, true },
{ {"highway", "tertiary"}, kSpeedTertiaryKMpH, true },
{ {"highway", "tertiary_link"}, kSpeedTertiaryLinkKMpH, true },
{ {"highway", "service"}, kSpeedServiceKMpH, true }, // *
{ {"highway", "service"}, kSpeedServiceKMpH, true },
{ {"highway", "unclassified"}, kSpeedUnclassifiedKMpH, true },
{ {"highway", "road"}, kSpeedRoadKMpH, true },
{ {"highway", "track"}, kSpeedTrackKMpH, true }, // *
{ {"highway", "track"}, kSpeedTrackKMpH, true },
{ {"highway", "path"}, kSpeedPathKMpH, true },
{ {"highway", "cycleway"}, kSpeedCyclewayKMpH, true },
{ {"highway", "residential"}, kSpeedResidentialKMpH, true },
{ {"highway", "living_street"}, kSpeedLivingStreetKMpH, true },
{ {"highway", "steps"}, kSpeedStepsKMpH, true }, // *
{ {"highway", "platform"}, kSpeedPlatformKMpH, true }, // *
{ {"highway", "steps"}, kSpeedStepsKMpH, true },
{ {"highway", "platform"}, kSpeedPlatformKMpH, true },
};
// Ukraine
@ -526,10 +525,10 @@ routing::VehicleModel::InitListT const g_bicycleLimitsUkraine =
{ {"highway", "cycleway"}, kSpeedCyclewayKMpH, true },
{ {"highway", "residential"}, kSpeedResidentialKMpH, true },
{ {"highway", "living_street"}, kSpeedLivingStreetKMpH, false },
{ {"highway", "steps"}, kSpeedStepsKMpH, true }, // *
{ {"highway", "steps"}, kSpeedStepsKMpH, true },
{ {"highway", "pedestrian"}, kSpeedPedestrianKMpH, true },
{ {"highway", "footway"}, kSpeedFootwayKMpH, true },
{ {"highway", "platform"}, kSpeedPlatformKMpH, true }, // *
{ {"highway", "platform"}, kSpeedPlatformKMpH, true },
};
// United Kingdom
@ -543,17 +542,17 @@ routing::VehicleModel::InitListT const g_bicycleLimitsUK =
{ {"highway", "secondary_link"}, kSpeedSecondaryLinkKMpH, true },
{ {"highway", "tertiary"}, kSpeedTertiaryKMpH, true },
{ {"highway", "tertiary_link"}, kSpeedTertiaryLinkKMpH, true },
{ {"highway", "service"}, kSpeedServiceKMpH, true }, // *
{ {"highway", "service"}, kSpeedServiceKMpH, true },
{ {"highway", "unclassified"}, kSpeedUnclassifiedKMpH, true },
{ {"highway", "road"}, kSpeedRoadKMpH, true }, // *
{ {"highway", "track"}, kSpeedTrackKMpH, true }, // *
{ {"highway", "road"}, kSpeedRoadKMpH, true },
{ {"highway", "track"}, kSpeedTrackKMpH, true },
{ {"highway", "path"}, kSpeedPathKMpH, true },
{ {"highway", "bridleway"}, kSpeedBridlewayKMpH, true },
{ {"highway", "cycleway"}, kSpeedCyclewayKMpH, true },
{ {"highway", "residential"}, kSpeedResidentialKMpH, true },
{ {"highway", "living_street"}, kSpeedLivingStreetKMpH, true },
{ {"highway", "steps"}, kSpeedStepsKMpH, true }, // *
{ {"highway", "platform"}, kSpeedPlatformKMpH, true }, // *
{ {"highway", "steps"}, kSpeedStepsKMpH, true },
{ {"highway", "platform"}, kSpeedPlatformKMpH, true },
};
// USA
@ -567,18 +566,18 @@ routing::VehicleModel::InitListT const g_bicycleLimitsUSA =
{ {"highway", "secondary_link"}, kSpeedSecondaryLinkKMpH, true },
{ {"highway", "tertiary"}, kSpeedTertiaryKMpH, true },
{ {"highway", "tertiary_link"}, kSpeedTertiaryLinkKMpH, true },
{ {"highway", "service"}, kSpeedServiceKMpH, true }, // *
{ {"highway", "service"}, kSpeedServiceKMpH, true },
{ {"highway", "unclassified"}, kSpeedUnclassifiedKMpH, true },
{ {"highway", "road"}, kSpeedRoadKMpH, true },
{ {"highway", "track"}, kSpeedTrackKMpH, true }, // *
{ {"highway", "track"}, kSpeedTrackKMpH, true },
{ {"highway", "path"}, kSpeedPathKMpH, true },
{ {"highway", "bridleway"}, kSpeedBridlewayKMpH, true },
{ {"highway", "cycleway"}, kSpeedCyclewayKMpH, true },
{ {"highway", "residential"}, kSpeedResidentialKMpH, true },
{ {"highway", "living_street"}, kSpeedLivingStreetKMpH, true },
{ {"highway", "steps"}, kSpeedStepsKMpH, true }, // *
{ {"highway", "steps"}, kSpeedStepsKMpH, true },
{ {"highway", "pedestrian"}, kSpeedPedestrianKMpH, true },
{ {"highway", "platform"}, kSpeedPlatformKMpH, true }, // *
{ {"highway", "platform"}, kSpeedPlatformKMpH, true },
};
} // namespace

View file

@ -14,8 +14,7 @@ namespace
// http://wiki.openstreetmap.org/wiki/OSM_tags_for_routing/Access-Restrictions
// Document contains proposals for some countries, but we assume that some kinds of roads are ready for pedestrian routing,
// but not listed in tables in the document. For example, steps are not listed, paths, roads and services features also
// can be treated as ready for pedestrian routing.
// Kinds of roads which we assume footable are marked by // * below.
// can be treated as ready for pedestrian routing. These road types were added to lists below.
// See road types here:
// http://wiki.openstreetmap.org/wiki/Key:highway
@ -60,17 +59,17 @@ routing::VehicleModel::InitListT const g_pedestrianLimitsDefault =
{ {"highway", "secondary_link"}, kSpeedSecondaryLinkKMpH, true },
{ {"highway", "tertiary"}, kSpeedTertiaryKMpH, true },
{ {"highway", "tertiary_link"}, kSpeedTertiaryLinkKMpH, true },
{ {"highway", "service"}, kSpeedServiceKMpH, true }, // *
{ {"highway", "service"}, kSpeedServiceKMpH, true },
{ {"highway", "unclassified"}, kSpeedUnclassifiedKMpH, true },
{ {"highway", "road"}, kSpeedRoadKMpH, true },
{ {"highway", "track"}, kSpeedTrackKMpH, true }, // *
{ {"highway", "track"}, kSpeedTrackKMpH, true },
{ {"highway", "path"}, kSpeedPathKMpH, true },
{ {"highway", "residential"}, kSpeedResidentialKMpH, true },
{ {"highway", "living_street"}, kSpeedLivingStreetKMpH, true },
{ {"highway", "steps"}, kSpeedStepsKMpH, true }, // *
{ {"highway", "steps"}, kSpeedStepsKMpH, true },
{ {"highway", "pedestrian"}, kSpeedPedestrianKMpH, true },
{ {"highway", "footway"}, kSpeedFootwayKMpH, true },
{ {"highway", "platform"}, kSpeedPlatformKMpH, true }, // *
{ {"highway", "platform"}, kSpeedPlatformKMpH, true },
};
// All options available.
@ -110,19 +109,19 @@ routing::VehicleModel::InitListT const g_pedestrianLimitsAustralia =
{ {"highway", "secondary_link"}, kSpeedSecondaryLinkKMpH, true },
{ {"highway", "tertiary"}, kSpeedTertiaryKMpH, true },
{ {"highway", "tertiary_link"}, kSpeedTertiaryLinkKMpH, true },
{ {"highway", "service"}, kSpeedServiceKMpH, true }, // *
{ {"highway", "service"}, kSpeedServiceKMpH, true },
{ {"highway", "unclassified"}, kSpeedUnclassifiedKMpH, true },
{ {"highway", "road"}, kSpeedRoadKMpH, true },
{ {"highway", "track"}, kSpeedTrackKMpH, true }, // *
{ {"highway", "path"}, kSpeedPathKMpH, true }, // *
{ {"highway", "track"}, kSpeedTrackKMpH, true },
{ {"highway", "path"}, kSpeedPathKMpH, true },
{ {"highway", "bridleway"}, kSpeedBridlewayKMpH, true },
{ {"highway", "cycleway"}, kSpeedCyclewayKMpH, true },
{ {"highway", "residential"}, kSpeedResidentialKMpH, true },
{ {"highway", "living_street"}, kSpeedLivingStreetKMpH, true },
{ {"highway", "steps"}, kSpeedStepsKMpH, true }, // *
{ {"highway", "steps"}, kSpeedStepsKMpH, true },
{ {"highway", "pedestrian"}, kSpeedPedestrianKMpH, true },
{ {"highway", "footway"}, kSpeedFootwayKMpH, true },
{ {"highway", "platform"}, kSpeedPlatformKMpH, true }, // *
{ {"highway", "platform"}, kSpeedPlatformKMpH, true },
};
// Austria
@ -142,10 +141,10 @@ routing::VehicleModel::InitListT const g_pedestrianLimitsAustria =
{ {"highway", "cycleway"}, kSpeedCyclewayKMpH, true },
{ {"highway", "residential"}, kSpeedResidentialKMpH, true },
{ {"highway", "living_street"}, kSpeedLivingStreetKMpH, true },
{ {"highway", "steps"}, kSpeedStepsKMpH, true }, // *
{ {"highway", "steps"}, kSpeedStepsKMpH, true },
{ {"highway", "pedestrian"}, kSpeedPedestrianKMpH, true },
{ {"highway", "footway"}, kSpeedFootwayKMpH, true },
{ {"highway", "platform"}, kSpeedPlatformKMpH, true }, // *
{ {"highway", "platform"}, kSpeedPlatformKMpH, true },
};
// Belarus
@ -159,18 +158,18 @@ routing::VehicleModel::InitListT const g_pedestrianLimitsBelarus =
{ {"highway", "secondary_link"}, kSpeedSecondaryLinkKMpH, true },
{ {"highway", "tertiary"}, kSpeedTertiaryKMpH, true },
{ {"highway", "tertiary_link"}, kSpeedTertiaryLinkKMpH, true },
{ {"highway", "service"}, kSpeedServiceKMpH, true }, // *
{ {"highway", "service"}, kSpeedServiceKMpH, true },
{ {"highway", "unclassified"}, kSpeedUnclassifiedKMpH, true },
{ {"highway", "road"}, kSpeedRoadKMpH, true }, // *
{ {"highway", "track"}, kSpeedTrackKMpH, true }, // *
{ {"highway", "path"}, kSpeedPathKMpH, true }, // *
{ {"highway", "road"}, kSpeedRoadKMpH, true },
{ {"highway", "track"}, kSpeedTrackKMpH, true },
{ {"highway", "path"}, kSpeedPathKMpH, true },
{ {"highway", "cycleway"}, kSpeedCyclewayKMpH, true },
{ {"highway", "residential"}, kSpeedResidentialKMpH, true },
{ {"highway", "living_street"}, kSpeedLivingStreetKMpH, true },
{ {"highway", "steps"}, kSpeedStepsKMpH, true }, // *
{ {"highway", "steps"}, kSpeedStepsKMpH, true },
{ {"highway", "pedestrian"}, kSpeedPedestrianKMpH, true },
{ {"highway", "footway"}, kSpeedFootwayKMpH, true },
{ {"highway", "platform"}, kSpeedPlatformKMpH, true }, // *
{ {"highway", "platform"}, kSpeedPlatformKMpH, true },
};
// Belgium
@ -184,17 +183,17 @@ routing::VehicleModel::InitListT const g_pedestrianLimitsBelgium =
{ {"highway", "tertiary_link"}, kSpeedTertiaryLinkKMpH, true },
{ {"highway", "service"}, kSpeedServiceKMpH, true },
{ {"highway", "unclassified"}, kSpeedUnclassifiedKMpH, true },
{ {"highway", "road"}, kSpeedRoadKMpH, true }, // *
{ {"highway", "road"}, kSpeedRoadKMpH, true },
{ {"highway", "track"}, kSpeedTrackKMpH, true },
{ {"highway", "path"}, kSpeedPathKMpH, true },
{ {"highway", "bridleway"}, kSpeedBridlewayKMpH, true },
{ {"highway", "cycleway"}, kSpeedCyclewayKMpH, true },
{ {"highway", "residential"}, kSpeedResidentialKMpH, true }, // *
{ {"highway", "living_street"}, kSpeedLivingStreetKMpH, true }, // *
{ {"highway", "steps"}, kSpeedStepsKMpH, true }, // *
{ {"highway", "residential"}, kSpeedResidentialKMpH, true },
{ {"highway", "living_street"}, kSpeedLivingStreetKMpH, true },
{ {"highway", "steps"}, kSpeedStepsKMpH, true },
{ {"highway", "pedestrian"}, kSpeedPedestrianKMpH, true },
{ {"highway", "footway"}, kSpeedFootwayKMpH, true },
{ {"highway", "platform"}, kSpeedPlatformKMpH, true }, // *
{ {"highway", "platform"}, kSpeedPlatformKMpH, true },
};
// Brazil
@ -208,19 +207,19 @@ routing::VehicleModel::InitListT const g_pedestrianLimitsBrazil =
{ {"highway", "secondary_link"}, kSpeedSecondaryLinkKMpH, true },
{ {"highway", "tertiary"}, kSpeedTertiaryKMpH, true },
{ {"highway", "tertiary_link"}, kSpeedTertiaryLinkKMpH, true },
{ {"highway", "service"}, kSpeedServiceKMpH, true }, // *
{ {"highway", "service"}, kSpeedServiceKMpH, true },
{ {"highway", "unclassified"}, kSpeedUnclassifiedKMpH, true },
{ {"highway", "road"}, kSpeedRoadKMpH, true },
{ {"highway", "track"}, kSpeedTrackKMpH, true }, // *
{ {"highway", "track"}, kSpeedTrackKMpH, true },
{ {"highway", "path"}, kSpeedPathKMpH, true },
{ {"highway", "bridleway"}, kSpeedBridlewayKMpH, true },
{ {"highway", "cycleway"}, kSpeedCyclewayKMpH, true },
{ {"highway", "residential"}, kSpeedResidentialKMpH, true },
{ {"highway", "living_street"}, kSpeedLivingStreetKMpH, true },
{ {"highway", "steps"}, kSpeedStepsKMpH, true }, // *
{ {"highway", "steps"}, kSpeedStepsKMpH, true },
{ {"highway", "pedestrian"}, kSpeedPedestrianKMpH, true },
{ {"highway", "footway"}, kSpeedFootwayKMpH, true },
{ {"highway", "platform"}, kSpeedPlatformKMpH, true }, // *
{ {"highway", "platform"}, kSpeedPlatformKMpH, true },
};
// Denmark
@ -232,18 +231,18 @@ routing::VehicleModel::InitListT const g_pedestrianLimitsDenmark =
{ {"highway", "secondary_link"}, kSpeedSecondaryLinkKMpH, true },
{ {"highway", "tertiary"}, kSpeedTertiaryKMpH, true },
{ {"highway", "tertiary_link"}, kSpeedTertiaryLinkKMpH, true },
{ {"highway", "service"}, kSpeedServiceKMpH, true }, // *
{ {"highway", "service"}, kSpeedServiceKMpH, true },
{ {"highway", "unclassified"}, kSpeedUnclassifiedKMpH, true },
{ {"highway", "road"}, kSpeedRoadKMpH, true }, // *
{ {"highway", "road"}, kSpeedRoadKMpH, true },
{ {"highway", "track"}, kSpeedTrackKMpH, true },
{ {"highway", "path"}, kSpeedPathKMpH, true },
{ {"highway", "cycleway"}, kSpeedCyclewayKMpH, true },
{ {"highway", "residential"}, kSpeedResidentialKMpH, true },
{ {"highway", "living_street"}, kSpeedLivingStreetKMpH, true },
{ {"highway", "steps"}, kSpeedStepsKMpH, true }, // *
{ {"highway", "steps"}, kSpeedStepsKMpH, true },
{ {"highway", "pedestrian"}, kSpeedPedestrianKMpH, true },
{ {"highway", "footway"}, kSpeedFootwayKMpH, true },
{ {"highway", "platform"}, kSpeedPlatformKMpH, true }, // *
{ {"highway", "platform"}, kSpeedPlatformKMpH, true },
};
// France
@ -255,17 +254,17 @@ routing::VehicleModel::InitListT const g_pedestrianLimitsFrance =
{ {"highway", "secondary_link"}, kSpeedSecondaryLinkKMpH, true },
{ {"highway", "tertiary"}, kSpeedTertiaryKMpH, true },
{ {"highway", "tertiary_link"}, kSpeedTertiaryLinkKMpH, true },
{ {"highway", "service"}, kSpeedServiceKMpH, true }, // *
{ {"highway", "service"}, kSpeedServiceKMpH, true },
{ {"highway", "unclassified"}, kSpeedUnclassifiedKMpH, true },
{ {"highway", "road"}, kSpeedRoadKMpH, true }, // *
{ {"highway", "road"}, kSpeedRoadKMpH, true },
{ {"highway", "track"}, kSpeedTrackKMpH, true },
{ {"highway", "path"}, kSpeedPathKMpH, true },
{ {"highway", "residential"}, kSpeedResidentialKMpH, true },
{ {"highway", "living_street"}, kSpeedLivingStreetKMpH, true },
{ {"highway", "steps"}, kSpeedStepsKMpH, true }, // *
{ {"highway", "steps"}, kSpeedStepsKMpH, true },
{ {"highway", "pedestrian"}, kSpeedPedestrianKMpH, true },
{ {"highway", "footway"}, kSpeedFootwayKMpH, true },
{ {"highway", "platform"}, kSpeedPlatformKMpH, true }, // *
{ {"highway", "platform"}, kSpeedPlatformKMpH, true },
};
// Finland
@ -279,9 +278,9 @@ routing::VehicleModel::InitListT const g_pedestrianLimitsFinland =
{ {"highway", "secondary_link"}, kSpeedSecondaryLinkKMpH, true },
{ {"highway", "tertiary"}, kSpeedTertiaryKMpH, true },
{ {"highway", "tertiary_link"}, kSpeedTertiaryLinkKMpH, true },
{ {"highway", "service"}, kSpeedServiceKMpH, true }, // *
{ {"highway", "service"}, kSpeedServiceKMpH, true },
{ {"highway", "unclassified"}, kSpeedUnclassifiedKMpH, true },
{ {"highway", "road"}, kSpeedRoadKMpH, true }, // *
{ {"highway", "road"}, kSpeedRoadKMpH, true },
{ {"highway", "track"}, kSpeedTrackKMpH, true },
{ {"highway", "path"}, kSpeedPathKMpH, true },
{ {"highway", "cycleway"}, kSpeedCyclewayKMpH, true },
@ -290,7 +289,7 @@ routing::VehicleModel::InitListT const g_pedestrianLimitsFinland =
{ {"highway", "steps"}, kSpeedStepsKMpH, true },
{ {"highway", "pedestrian"}, kSpeedPedestrianKMpH, true },
{ {"highway", "footway"}, kSpeedFootwayKMpH, true },
{ {"highway", "platform"}, kSpeedPlatformKMpH, true }, // *
{ {"highway", "platform"}, kSpeedPlatformKMpH, true },
};
// Germany
@ -304,17 +303,17 @@ routing::VehicleModel::InitListT const g_pedestrianLimitsGermany =
{ {"highway", "secondary_link"}, kSpeedSecondaryLinkKMpH, true },
{ {"highway", "tertiary"}, kSpeedTertiaryKMpH, true },
{ {"highway", "tertiary_link"}, kSpeedTertiaryLinkKMpH, true },
{ {"highway", "service"}, kSpeedServiceKMpH, true }, // *
{ {"highway", "service"}, kSpeedServiceKMpH, true },
{ {"highway", "unclassified"}, kSpeedUnclassifiedKMpH, true },
{ {"highway", "road"}, kSpeedRoadKMpH, true },
{ {"highway", "track"}, kSpeedTrackKMpH, true },
{ {"highway", "path"}, kSpeedPathKMpH, true },
{ {"highway", "residential"}, kSpeedResidentialKMpH, true },
{ {"highway", "living_street"}, kSpeedLivingStreetKMpH, true },
{ {"highway", "steps"}, kSpeedStepsKMpH, true }, // *
{ {"highway", "steps"}, kSpeedStepsKMpH, true },
{ {"highway", "pedestrian"}, kSpeedPedestrianKMpH, true },
{ {"highway", "footway"}, kSpeedFootwayKMpH, true },
{ {"highway", "platform"}, kSpeedPlatformKMpH, true }, // *
{ {"highway", "platform"}, kSpeedPlatformKMpH, true },
};
// Hungary
@ -326,17 +325,17 @@ routing::VehicleModel::InitListT const g_pedestrianLimitsHungary =
{ {"highway", "secondary_link"}, kSpeedSecondaryLinkKMpH, true },
{ {"highway", "tertiary"}, kSpeedTertiaryKMpH, true },
{ {"highway", "tertiary_link"}, kSpeedTertiaryLinkKMpH, true },
{ {"highway", "service"}, kSpeedServiceKMpH, true }, // *
{ {"highway", "service"}, kSpeedServiceKMpH, true },
{ {"highway", "unclassified"}, kSpeedUnclassifiedKMpH, true },
{ {"highway", "road"}, kSpeedRoadKMpH, true },
{ {"highway", "track"}, kSpeedTrackKMpH, true }, // *
{ {"highway", "path"}, kSpeedPathKMpH, true }, // *
{ {"highway", "track"}, kSpeedTrackKMpH, true },
{ {"highway", "path"}, kSpeedPathKMpH, true },
{ {"highway", "residential"}, kSpeedResidentialKMpH, true },
{ {"highway", "living_street"}, kSpeedLivingStreetKMpH, true },
{ {"highway", "steps"}, kSpeedStepsKMpH, true }, // *
{ {"highway", "steps"}, kSpeedStepsKMpH, true },
{ {"highway", "pedestrian"}, kSpeedPedestrianKMpH, true },
{ {"highway", "footway"}, kSpeedFootwayKMpH, true },
{ {"highway", "platform"}, kSpeedPlatformKMpH, true }, // *
{ {"highway", "platform"}, kSpeedPlatformKMpH, true },
};
// Netherlands
@ -348,7 +347,7 @@ routing::VehicleModel::InitListT const g_pedestrianLimitsNetherlands =
{ {"highway", "secondary_link"}, kSpeedSecondaryLinkKMpH, true },
{ {"highway", "tertiary"}, kSpeedTertiaryKMpH, true },
{ {"highway", "tertiary_link"}, kSpeedTertiaryLinkKMpH, true },
{ {"highway", "service"}, kSpeedServiceKMpH, true }, // *
{ {"highway", "service"}, kSpeedServiceKMpH, true },
{ {"highway", "unclassified"}, kSpeedUnclassifiedKMpH, true },
{ {"highway", "road"}, kSpeedRoadKMpH, true },
{ {"highway", "track"}, kSpeedTrackKMpH, true },
@ -356,10 +355,10 @@ routing::VehicleModel::InitListT const g_pedestrianLimitsNetherlands =
{ {"highway", "cycleway"}, kSpeedCyclewayKMpH, true },
{ {"highway", "residential"}, kSpeedResidentialKMpH, true },
{ {"highway", "living_street"}, kSpeedLivingStreetKMpH, true },
{ {"highway", "steps"}, kSpeedStepsKMpH, true }, // *
{ {"highway", "steps"}, kSpeedStepsKMpH, true },
{ {"highway", "pedestrian"}, kSpeedPedestrianKMpH, true },
{ {"highway", "footway"}, kSpeedFootwayKMpH, true },
{ {"highway", "platform"}, kSpeedPlatformKMpH, true }, // *
{ {"highway", "platform"}, kSpeedPlatformKMpH, true },
};
// Norway
@ -373,7 +372,7 @@ routing::VehicleModel::InitListT const g_pedestrianLimitsNorway =
{ {"highway", "secondary_link"}, kSpeedSecondaryLinkKMpH, true },
{ {"highway", "tertiary"}, kSpeedTertiaryKMpH, true },
{ {"highway", "tertiary_link"}, kSpeedTertiaryLinkKMpH, true },
{ {"highway", "service"}, kSpeedServiceKMpH, true }, // *
{ {"highway", "service"}, kSpeedServiceKMpH, true },
{ {"highway", "unclassified"}, kSpeedUnclassifiedKMpH, true },
{ {"highway", "road"}, kSpeedRoadKMpH, true },
{ {"highway", "track"}, kSpeedTrackKMpH, true },
@ -382,10 +381,10 @@ routing::VehicleModel::InitListT const g_pedestrianLimitsNorway =
{ {"highway", "cycleway"}, kSpeedCyclewayKMpH, true },
{ {"highway", "residential"}, kSpeedResidentialKMpH, true },
{ {"highway", "living_street"}, kSpeedLivingStreetKMpH, true },
{ {"highway", "steps"}, kSpeedStepsKMpH, true }, // *
{ {"highway", "steps"}, kSpeedStepsKMpH, true },
{ {"highway", "pedestrian"}, kSpeedPedestrianKMpH, true },
{ {"highway", "footway"}, kSpeedFootwayKMpH, true },
{ {"highway", "platform"}, kSpeedPlatformKMpH, true }, // *
{ {"highway", "platform"}, kSpeedPlatformKMpH, true },
};
// Poland
@ -397,17 +396,17 @@ routing::VehicleModel::InitListT const g_pedestrianLimitsPoland =
{ {"highway", "secondary_link"}, kSpeedSecondaryLinkKMpH, true },
{ {"highway", "tertiary"}, kSpeedTertiaryKMpH, true },
{ {"highway", "tertiary_link"}, kSpeedTertiaryLinkKMpH, true },
{ {"highway", "service"}, kSpeedServiceKMpH, true }, // *
{ {"highway", "service"}, kSpeedServiceKMpH, true },
{ {"highway", "unclassified"}, kSpeedUnclassifiedKMpH, true },
{ {"highway", "road"}, kSpeedRoadKMpH, true },
{ {"highway", "track"}, kSpeedTrackKMpH, true }, // *
{ {"highway", "track"}, kSpeedTrackKMpH, true },
{ {"highway", "path"}, kSpeedPathKMpH, true },
{ {"highway", "residential"}, kSpeedResidentialKMpH, true },
{ {"highway", "living_street"}, kSpeedLivingStreetKMpH, true },
{ {"highway", "steps"}, kSpeedStepsKMpH, true }, // *
{ {"highway", "steps"}, kSpeedStepsKMpH, true },
{ {"highway", "pedestrian"}, kSpeedPedestrianKMpH, true },
{ {"highway", "footway"}, kSpeedFootwayKMpH, true },
{ {"highway", "platform"}, kSpeedPlatformKMpH, true }, // *
{ {"highway", "platform"}, kSpeedPlatformKMpH, true },
};
// Romania
@ -419,17 +418,17 @@ routing::VehicleModel::InitListT const g_pedestrianLimitsRomania =
{ {"highway", "secondary_link"}, kSpeedSecondaryLinkKMpH, true },
{ {"highway", "tertiary"}, kSpeedTertiaryKMpH, true },
{ {"highway", "tertiary_link"}, kSpeedTertiaryLinkKMpH, true },
{ {"highway", "service"}, kSpeedServiceKMpH, true }, // *
{ {"highway", "service"}, kSpeedServiceKMpH, true },
{ {"highway", "unclassified"}, kSpeedUnclassifiedKMpH, true },
{ {"highway", "road"}, kSpeedRoadKMpH, true },
{ {"highway", "track"}, kSpeedTrackKMpH, true },
{ {"highway", "path"}, kSpeedPathKMpH, true },
{ {"highway", "residential"}, kSpeedResidentialKMpH, true },
{ {"highway", "living_street"}, kSpeedLivingStreetKMpH, true },
{ {"highway", "steps"}, kSpeedStepsKMpH, true }, // *
{ {"highway", "steps"}, kSpeedStepsKMpH, true },
{ {"highway", "pedestrian"}, kSpeedPedestrianKMpH, true },
{ {"highway", "footway"}, kSpeedFootwayKMpH, true },
{ {"highway", "platform"}, kSpeedPlatformKMpH, true }, // *
{ {"highway", "platform"}, kSpeedPlatformKMpH, true },
};
// Russia
@ -446,7 +445,7 @@ routing::VehicleModel::InitListT const g_pedestrianLimitsRussia =
{ {"highway", "service"}, kSpeedServiceKMpH, true },
{ {"highway", "unclassified"}, kSpeedUnclassifiedKMpH, true },
{ {"highway", "road"}, kSpeedRoadKMpH, true },
{ {"highway", "track"}, kSpeedTrackKMpH, true }, // *
{ {"highway", "track"}, kSpeedTrackKMpH, true },
{ {"highway", "path"}, kSpeedPathKMpH, true },
{ {"highway", "cycleway"}, kSpeedCyclewayKMpH, true },
{ {"highway", "residential"}, kSpeedResidentialKMpH, true },
@ -454,7 +453,7 @@ routing::VehicleModel::InitListT const g_pedestrianLimitsRussia =
{ {"highway", "steps"}, kSpeedStepsKMpH, true },
{ {"highway", "pedestrian"}, kSpeedPedestrianKMpH, true },
{ {"highway", "footway"}, kSpeedFootwayKMpH, true },
{ {"highway", "platform"}, kSpeedPlatformKMpH, true }, // *
{ {"highway", "platform"}, kSpeedPlatformKMpH, true },
};
// Slovakia
@ -466,17 +465,17 @@ routing::VehicleModel::InitListT const g_pedestrianLimitsSlovakia =
{ {"highway", "secondary_link"}, kSpeedSecondaryLinkKMpH, true },
{ {"highway", "tertiary"}, kSpeedTertiaryKMpH, true },
{ {"highway", "tertiary_link"}, kSpeedTertiaryLinkKMpH, true },
{ {"highway", "service"}, kSpeedServiceKMpH, true }, // *
{ {"highway", "service"}, kSpeedServiceKMpH, true },
{ {"highway", "unclassified"}, kSpeedUnclassifiedKMpH, true },
{ {"highway", "road"}, kSpeedRoadKMpH, true },
{ {"highway", "track"}, kSpeedTrackKMpH, true }, // *
{ {"highway", "track"}, kSpeedTrackKMpH, true },
{ {"highway", "path"}, kSpeedPathKMpH, true },
{ {"highway", "residential"}, kSpeedResidentialKMpH, true },
{ {"highway", "living_street"}, kSpeedLivingStreetKMpH, true },
{ {"highway", "steps"}, kSpeedStepsKMpH, true }, // *
{ {"highway", "steps"}, kSpeedStepsKMpH, true },
{ {"highway", "pedestrian"}, kSpeedPedestrianKMpH, true },
{ {"highway", "footway"}, kSpeedFootwayKMpH, true },
{ {"highway", "platform"}, kSpeedPlatformKMpH, true }, // *
{ {"highway", "platform"}, kSpeedPlatformKMpH, true },
};
// Switzerland
@ -488,17 +487,17 @@ routing::VehicleModel::InitListT const g_pedestrianLimitsSwitzerland =
{ {"highway", "secondary_link"}, kSpeedSecondaryLinkKMpH, true },
{ {"highway", "tertiary"}, kSpeedTertiaryKMpH, true },
{ {"highway", "tertiary_link"}, kSpeedTertiaryLinkKMpH, true },
{ {"highway", "service"}, kSpeedServiceKMpH, true }, // *
{ {"highway", "service"}, kSpeedServiceKMpH, true },
{ {"highway", "unclassified"}, kSpeedUnclassifiedKMpH, true },
{ {"highway", "road"}, kSpeedRoadKMpH, true },
{ {"highway", "track"}, kSpeedTrackKMpH, true },
{ {"highway", "path"}, kSpeedPathKMpH, true },
{ {"highway", "residential"}, kSpeedResidentialKMpH, true },
{ {"highway", "living_street"}, kSpeedLivingStreetKMpH, true },
{ {"highway", "steps"}, kSpeedStepsKMpH, true }, // *
{ {"highway", "steps"}, kSpeedStepsKMpH, true },
{ {"highway", "pedestrian"}, kSpeedPedestrianKMpH, true },
{ {"highway", "footway"}, kSpeedFootwayKMpH, true },
{ {"highway", "platform"}, kSpeedPlatformKMpH, true }, // *
{ {"highway", "platform"}, kSpeedPlatformKMpH, true },
};
// Turkey
@ -512,19 +511,19 @@ routing::VehicleModel::InitListT const g_pedestrianLimitsTurkey =
{ {"highway", "secondary_link"}, kSpeedSecondaryLinkKMpH, true },
{ {"highway", "tertiary"}, kSpeedTertiaryKMpH, true },
{ {"highway", "tertiary_link"}, kSpeedTertiaryLinkKMpH, true },
{ {"highway", "service"}, kSpeedServiceKMpH, true }, // *
{ {"highway", "service"}, kSpeedServiceKMpH, true },
{ {"highway", "unclassified"}, kSpeedUnclassifiedKMpH, true },
{ {"highway", "road"}, kSpeedRoadKMpH, true },
{ {"highway", "track"}, kSpeedTrackKMpH, true }, // *
{ {"highway", "track"}, kSpeedTrackKMpH, true },
{ {"highway", "path"}, kSpeedPathKMpH, true },
{ {"highway", "bridleway"}, kSpeedBridlewayKMpH, true },
{ {"highway", "cycleway"}, kSpeedCyclewayKMpH, true },
{ {"highway", "residential"}, kSpeedResidentialKMpH, true },
{ {"highway", "living_street"}, kSpeedLivingStreetKMpH, true },
{ {"highway", "steps"}, kSpeedStepsKMpH, true }, // *
{ {"highway", "steps"}, kSpeedStepsKMpH, true },
{ {"highway", "pedestrian"}, kSpeedPedestrianKMpH, true },
{ {"highway", "footway"}, kSpeedFootwayKMpH, true },
{ {"highway", "platform"}, kSpeedPlatformKMpH, true }, // *
{ {"highway", "platform"}, kSpeedPlatformKMpH, true },
};
// Ukraine
@ -546,7 +545,7 @@ routing::VehicleModel::InitListT const g_pedestrianLimitsUkraine =
{ {"highway", "steps"}, kSpeedStepsKMpH, true },
{ {"highway", "pedestrian"}, kSpeedPedestrianKMpH, true },
{ {"highway", "footway"}, kSpeedFootwayKMpH, true },
{ {"highway", "platform"}, kSpeedPlatformKMpH, true }, // *
{ {"highway", "platform"}, kSpeedPlatformKMpH, true },
};
// United Kingdom
@ -560,19 +559,19 @@ routing::VehicleModel::InitListT const g_pedestrianLimitsUK =
{ {"highway", "secondary_link"}, kSpeedSecondaryLinkKMpH, true },
{ {"highway", "tertiary"}, kSpeedTertiaryKMpH, true },
{ {"highway", "tertiary_link"}, kSpeedTertiaryLinkKMpH, true },
{ {"highway", "service"}, kSpeedServiceKMpH, true }, // *
{ {"highway", "service"}, kSpeedServiceKMpH, true },
{ {"highway", "unclassified"}, kSpeedUnclassifiedKMpH, true },
{ {"highway", "road"}, kSpeedRoadKMpH, true }, // *
{ {"highway", "track"}, kSpeedTrackKMpH, true }, // *
{ {"highway", "road"}, kSpeedRoadKMpH, true },
{ {"highway", "track"}, kSpeedTrackKMpH, true },
{ {"highway", "path"}, kSpeedPathKMpH, true },
{ {"highway", "bridleway"}, kSpeedBridlewayKMpH, true },
{ {"highway", "cycleway"}, kSpeedCyclewayKMpH, true },
{ {"highway", "residential"}, kSpeedResidentialKMpH, true },
{ {"highway", "living_street"}, kSpeedLivingStreetKMpH, true },
{ {"highway", "steps"}, kSpeedStepsKMpH, true }, // *
{ {"highway", "steps"}, kSpeedStepsKMpH, true },
{ {"highway", "pedestrian"}, kSpeedPedestrianKMpH, true },
{ {"highway", "footway"}, kSpeedFootwayKMpH, true },
{ {"highway", "platform"}, kSpeedPlatformKMpH, true }, // *
{ {"highway", "platform"}, kSpeedPlatformKMpH, true },
};
// USA
@ -586,19 +585,19 @@ routing::VehicleModel::InitListT const g_pedestrianLimitsUS =
{ {"highway", "secondary_link"}, kSpeedSecondaryLinkKMpH, true },
{ {"highway", "tertiary"}, kSpeedTertiaryKMpH, true },
{ {"highway", "tertiary_link"}, kSpeedTertiaryLinkKMpH, true },
{ {"highway", "service"}, kSpeedServiceKMpH, true }, // *
{ {"highway", "service"}, kSpeedServiceKMpH, true },
{ {"highway", "unclassified"}, kSpeedUnclassifiedKMpH, true },
{ {"highway", "road"}, kSpeedRoadKMpH, true },
{ {"highway", "track"}, kSpeedTrackKMpH, true }, // *
{ {"highway", "track"}, kSpeedTrackKMpH, true },
{ {"highway", "path"}, kSpeedPathKMpH, true },
{ {"highway", "bridleway"}, kSpeedBridlewayKMpH, true },
{ {"highway", "cycleway"}, kSpeedCyclewayKMpH, true },
{ {"highway", "residential"}, kSpeedResidentialKMpH, true },
{ {"highway", "living_street"}, kSpeedLivingStreetKMpH, true },
{ {"highway", "steps"}, kSpeedStepsKMpH, true }, // *
{ {"highway", "steps"}, kSpeedStepsKMpH, true },
{ {"highway", "pedestrian"}, kSpeedPedestrianKMpH, true },
{ {"highway", "footway"}, kSpeedFootwayKMpH, true },
{ {"highway", "platform"}, kSpeedPlatformKMpH, true }, // *
{ {"highway", "platform"}, kSpeedPlatformKMpH, true },
};
} // namespace

View file

@ -31,8 +31,8 @@ VehicleModel::VehicleModel(Classificator const & c, InitListT const & featureTyp
for (auto const & v : featureTypeLimits)
{
m_maxSpeedKMpH = max(m_maxSpeedKMpH, v.m_speedKMpH);
m_types.emplace(std::make_pair(c.GetTypeByPath(vector<string>(v.m_types, v.m_types + 2)),
RoadLimits(v.m_speedKMpH, v.m_isTransitAllowed)));
m_types.emplace(make_pair(c.GetTypeByPath(vector<string>(v.m_types, v.m_types + 2)),
RoadLimits(v.m_speedKMpH, v.m_isTransitAllowed)));
}
}
@ -119,8 +119,8 @@ bool VehicleModel::IsTransitAllowed(FeatureType const & f) const
{
uint32_t const type = ftypes::BaseChecker::PrepareToMatch(t, 2);
auto it = m_types.find(type);
if (it != m_types.end() && it->second.GetIsTransitAllowed())
return true;
if (it != m_types.end() && it->second.IsTransitAllowed())
return true;
}
return false;

View file

@ -59,7 +59,7 @@ public:
class VehicleModel : public IVehicleModel
{
public:
struct FeatureTypeLimits
struct FeatureTypeLimits final
{
char const * m_types[2]; /// 2-arity road type
double m_speedKMpH; /// max allowed speed on this road type
@ -78,7 +78,6 @@ public:
bool IsTransitAllowed(FeatureType const & f) const override;
public:
/// @returns true if |m_types| or |m_addRoadTypes| contains |type| and false otherwise.
bool IsRoadType(uint32_t type) const;
@ -94,7 +93,7 @@ public:
}
protected:
struct AdditionalRoadTags
struct AdditionalRoadTags final
{
initializer_list<char const *> m_hwtag;
double m_speedKMpH;
@ -119,7 +118,7 @@ protected:
double m_maxSpeedKMpH;
private:
struct AdditionalRoadType
struct AdditionalRoadType final
{
AdditionalRoadType(Classificator const & c, AdditionalRoadTags const & tag);
@ -128,14 +127,14 @@ private:
double const m_speedKMpH;
};
class RoadLimits
class RoadLimits final
{
public:
RoadLimits() = delete;
RoadLimits(double speedKMpH, bool isTransitAllowed);
double GetSpeedKMpH() const {return m_speedKMpH;};
bool GetIsTransitAllowed() const {return m_isTransitAllowed;};
double GetSpeedKMpH() const { return m_speedKMpH; };
bool IsTransitAllowed() const { return m_isTransitAllowed; };
private:
double const m_speedKMpH;