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:
authormgsergio <mgsergio@yandex.ru>2017-09-08 13:00:11 +0300
committerGitHub <noreply@github.com>2017-09-08 13:00:11 +0300
commite6ad196efdd92fa30de6b7cddd11b68675785f61 (patch)
tree450488c7b30b95cc951dbcb3c79ca0a9c251e293
parent38812ea10d01f5f26c5ed06c9d06dd76a7006474 (diff)
parentf1c3c487b1acb5aa06168900458ef2f5cb94b760 (diff)
Merge pull request #7049 from ygorshenin/frc-threshold-release-75ios-store-751beta-998beta-997beta-996android-gr-751
[openlr] Added threshold for FRC checking.
-rw-r--r--openlr/openlr_stat/openlr_stat.cpp4
-rw-r--r--openlr/router.cpp3
2 files changed, 6 insertions, 1 deletions
diff --git a/openlr/openlr_stat/openlr_stat.cpp b/openlr/openlr_stat/openlr_stat.cpp
index ca31f8228b..f9a4f84702 100644
--- a/openlr/openlr_stat/openlr_stat.cpp
+++ b/openlr/openlr_stat/openlr_stat.cpp
@@ -35,6 +35,7 @@ DEFINE_string(assessment_output, "", "Path to output file in assessment-tool ori
DEFINE_string(non_matched_ids, "non-matched-ids.txt",
"Path to a file ids of non-matched segments will be saved to");
DEFINE_string(mwms_path, "", "Path to a folder with mwms.");
+DEFINE_string(resources_path, "", "Path to a folder with resources.");
DEFINE_int32(limit, -1, "Max number of segments to handle. -1 for all.");
DEFINE_bool(multipoints_only, false, "Only segments with multiple points to handle.");
DEFINE_int32(num_threads, 1, "Number of threads.");
@@ -210,6 +211,9 @@ int main(int argc, char * argv[])
google::SetUsageMessage("OpenLR stats tool.");
google::ParseCommandLineFlags(&argc, &argv, true);
+ if (!FLAGS_resources_path.empty())
+ GetPlatform().SetResourceDir(FLAGS_resources_path);
+
classificator::Load();
auto const numThreads = static_cast<uint32_t>(FLAGS_num_threads);
diff --git a/openlr/router.cpp b/openlr/router.cpp
index a5ce4c442e..eb894894d5 100644
--- a/openlr/router.cpp
+++ b/openlr/router.cpp
@@ -22,6 +22,7 @@ namespace openlr
{
namespace
{
+int const kFRCThreshold = 2;
size_t const kMaxRoadCandidates = 20;
double const kDistanceAccuracyM = 1000;
double const kEps = 1e-9;
@@ -432,7 +433,7 @@ bool Router::PassesRestriction(routing::Edge const & edge,
return true;
auto const frc = m_roadInfoGetter.Get(edge.GetFeatureId()).m_frc;
- return frc <= restriction;
+ return static_cast<int>(frc) <= static_cast<int>(restriction) + kFRCThreshold;
}
uint32_t Router::GetReverseBearing(Vertex const & u, Links const & links) const