v0.2.52..v0.2.53 changeset NetworkMatchCreator.cpp
Garret Voltz edited this page Feb 12, 2020
·
1 revision
diff --git a/hoot-core/src/main/cpp/hoot/core/conflate/network/NetworkMatchCreator.cpp b/hoot-core/src/main/cpp/hoot/core/conflate/network/NetworkMatchCreator.cpp
index f24567b..0bab6f5 100644
--- a/hoot-core/src/main/cpp/hoot/core/conflate/network/NetworkMatchCreator.cpp
+++ b/hoot-core/src/main/cpp/hoot/core/conflate/network/NetworkMatchCreator.cpp
@@ -22,7 +22,7 @@
* This will properly maintain the copyright information. DigitalGlobe
* copyrights will be updated automatically.
*
- * @copyright Copyright (C) 2015, 2016, 2017, 2018, 2019 DigitalGlobe (http://www.digitalglobe.com/)
+ * @copyright Copyright (C) 2015, 2016, 2017, 2018, 2019, 2020 DigitalGlobe (http://www.digitalglobe.com/)
*/
#include "NetworkMatchCreator.h"
@@ -87,13 +87,26 @@ ConstMatchPtr NetworkMatchCreator::_createMatch(const NetworkDetailsPtr& map, Ne
_matchScoringFunctionCurveMidpointX, _matchScoringFunctionCurveSteepness));
}
-void NetworkMatchCreator::createMatches(const ConstOsmMapPtr& map, std::vector<ConstMatchPtr>& matches,
- ConstMatchThresholdPtr threshold)
+void NetworkMatchCreator::createMatches(
+ const ConstOsmMapPtr& map, std::vector<ConstMatchPtr>& matches, ConstMatchThresholdPtr threshold)
{
QElapsedTimer timer;
timer.start();
- LOG_INFO("Looking for matches with: " << className() << "...");
+
+ QString searchRadiusStr;
+ const double searchRadius = ConfigOptions().getSearchRadiusHighway();
+ if (searchRadius < 0)
+ {
+ searchRadiusStr = "within a feature dependent search radius";
+ }
+ else
+ {
+ searchRadiusStr =
+ "within a search radius of " + QString::number(searchRadius, 'g', 2) + " meters";
+ }
+ LOG_STATUS("Looking for matches with: " << className() << " " << searchRadiusStr << "...");
LOG_VART(threshold);
+ const int matchesSizeBefore = matches.size();
// use another class to extract graph nodes and graph edges.
OsmNetworkExtractor e1;
@@ -167,10 +180,13 @@ void NetworkMatchCreator::createMatches(const ConstOsmMapPtr& map, std::vector<C
matches.push_back(match);
}
}
+ const int matchesSizeAfter = matches.size();
- LOG_INFO(
+ LOG_STATUS(
"Found " << StringUtils::formatLargeNumber(matches.size()) <<
- " highway match candidates in: " << StringUtils::millisecondsToDhms(timer.elapsed()) << ".");
+ " highway match candidates and " <<
+ StringUtils::formatLargeNumber(matchesSizeAfter - matchesSizeBefore) <<
+ " total matches in: " << StringUtils::millisecondsToDhms(timer.elapsed()) << ".");
}
vector<CreatorDescription> NetworkMatchCreator::getAllCreators() const