Skip to content

v0.2.54..v0.2.55 changeset MultiaryPoiConflateCmd.cpp

Garret Voltz edited this page Aug 14, 2020 · 1 revision
diff --git a/hoot-rnd/src/main/cpp/hoot/rnd/cmd/MultiaryPoiConflateCmd.cpp b/hoot-rnd/src/main/cpp/hoot/rnd/cmd/MultiaryPoiConflateCmd.cpp
index 83f71de..dc8ad27 100644
--- a/hoot-rnd/src/main/cpp/hoot/rnd/cmd/MultiaryPoiConflateCmd.cpp
+++ b/hoot-rnd/src/main/cpp/hoot/rnd/cmd/MultiaryPoiConflateCmd.cpp
@@ -22,7 +22,7 @@
  * This will properly maintain the copyright information. DigitalGlobe
  * copyrights will be updated automatically.
  *
- * @copyright Copyright (C) 2015, 2017, 2018, 2019 DigitalGlobe (http://www.digitalglobe.com/)
+ * @copyright Copyright (C) 2015, 2017, 2018, 2019, 2020 DigitalGlobe (http://www.digitalglobe.com/)
  */
 
 // Hoot
@@ -34,24 +34,23 @@
 #include <hoot/core/conflate/UnifyingConflator.h>
 #include <hoot/core/ops/NamedOp.h>
 #include <hoot/core/util/ConfigOptions.h>
-#include <hoot/core/visitors/CalculateHashVisitor.h>
+#include <hoot/rnd/visitors/MultiaryPoiHashVisitor.h>
 #include <hoot/core/io/OsmMapWriterFactory.h>
 #include <hoot/core/io/OsmXmlWriter.h>
 #include <hoot/core/util/ConfigOptions.h>
 #include <hoot/core/util/Log.h>
 #include <hoot/rnd/conflate/multiary/MultiaryUtilities.h>
 #include <hoot/core/io/IoUtils.h>
+#include <hoot/core/util/StringUtils.h>
 
 // Qt
 #include <QFileInfo>
 #include <QStringList>
+#include <QElapsedTimer>
 
 // Standard
 #include <fstream>
 
-// Tgs
-#include <tgs/System/Timer.h>
-
 using namespace std;
 using namespace Tgs;
 
@@ -75,7 +74,8 @@ public:
 
   virtual int runSimple(QStringList& args) override
   {
-    Timer totalTime;
+    QElapsedTimer timer;
+    timer.start();
 
     QStringList inputs;
     QString output;
@@ -102,7 +102,8 @@ public:
       IoUtils::loadMap(map, inputs[i], false, Status::fromInput(i));
     }
 
-    CalculateHashVisitor hashVisitor;
+    MultiaryPoiHashVisitor hashVisitor;
+    hashVisitor.setIncludeCircularError(true);
     map->visitRw(hashVisitor);
 
     LOG_INFO("Applying pre-conflation operations...");
@@ -120,9 +121,8 @@ public:
 
     IoUtils::saveMap(map, output);
 
-    LOG_INFO("Total time elapsed: " << totalTime.getElapsed());
-
-    LOG_INFO("Conflation job completed.");
+    LOG_STATUS(
+      "Conflation completed in " << StringUtils::millisecondsToDhms(timer.elapsed()) << " total.");
 
     return 0;
   }
Clone this wiki locally