Skip to content

v0.2.49..v0.2.50 changeset MatchFeatureExtractor.cpp

Garret Voltz edited this page Nov 6, 2019 · 1 revision
diff --git a/hoot-core/src/main/cpp/hoot/core/scoring/MatchFeatureExtractor.cpp b/hoot-core/src/main/cpp/hoot/core/scoring/MatchFeatureExtractor.cpp
index 526b76e..d4e5514 100644
--- a/hoot-core/src/main/cpp/hoot/core/scoring/MatchFeatureExtractor.cpp
+++ b/hoot-core/src/main/cpp/hoot/core/scoring/MatchFeatureExtractor.cpp
@@ -28,17 +28,18 @@
 #include "MatchFeatureExtractor.h"
 
 // Hoot
-#include <hoot/core/elements/OsmMap.h>
-#include <hoot/core/elements/Way.h>
 #include <hoot/core/conflate/matching/Match.h>
 #include <hoot/core/conflate/matching/MatchCreator.h>
 #include <hoot/core/conflate/matching/MatchDetails.h>
 #include <hoot/core/conflate/matching/MatchFactory.h>
-#include <hoot/core/util/HootException.h>
-#include <hoot/core/schema/MetadataTags.h>
 #include <hoot/core/conflate/matching/MatchType.h>
 #include <hoot/core/elements/ElementId.h>
+#include <hoot/core/elements/OsmMap.h>
+#include <hoot/core/elements/Way.h>
+#include <hoot/core/schema/MetadataTags.h>
+#include <hoot/core/util/HootException.h>
 #include <hoot/core/util/Log.h>
+#include <hoot/core/util/StringUtils.h>
 
 // Standard
 #include <numeric>
@@ -248,7 +249,7 @@ QString MatchFeatureExtractor::getResults(bool useNulls)
 
 void MatchFeatureExtractor::processMap(const std::shared_ptr<const OsmMap>& map)
 {
-  vector<const Match*> matches;
+  vector<ConstMatchPtr> matches;
   Envelope bounds;
   bounds.setToNull();
   std::shared_ptr<const MatchThreshold> mt(new MatchThreshold(0, 0));
@@ -256,7 +257,7 @@ void MatchFeatureExtractor::processMap(const std::shared_ptr<const OsmMap>& map)
   size_t matchCount = 0;
   for (size_t i = 0; i < matches.size(); i++)
   {
-    const MatchDetails* d = dynamic_cast<const MatchDetails*>(matches[i]);
+    const MatchDetails* d = dynamic_cast<const MatchDetails*>(matches[i].get());
     if (d == 0)
     {
       if (logWarnCount < Log::getWarnMessageLimit())
@@ -315,7 +316,9 @@ void MatchFeatureExtractor::processMap(const std::shared_ptr<const OsmMap>& map)
       }
     }
   }
-  LOG_INFO("Collected " << _samples.size() << " samples from " << matches.size() << " matches.");
+  LOG_INFO(
+    "Collected " << StringUtils::formatLargeNumber(_samples.size()) << " samples from " <<
+    StringUtils::formatLargeNumber(matches.size()) << " matches.");
 }
 
 void MatchFeatureExtractor::_resampleClasses()
Clone this wiki locally