Skip to content

v0.2.54..v0.2.55 changeset SplitMapCmd.cpp

Garret Voltz edited this page Aug 14, 2020 · 1 revision
diff --git a/hoot-core/src/main/cpp/hoot/core/cmd/SplitMapCmd.cpp b/hoot-core/src/main/cpp/hoot/core/cmd/SplitMapCmd.cpp
index 076757e..71266bc 100644
--- a/hoot-core/src/main/cpp/hoot/core/cmd/SplitMapCmd.cpp
+++ b/hoot-core/src/main/cpp/hoot/core/cmd/SplitMapCmd.cpp
@@ -22,7 +22,7 @@
  * This will properly maintain the copyright information. DigitalGlobe
  * copyrights will be updated automatically.
  *
- * @copyright Copyright (C) 2019 DigitalGlobe (http://www.digitalglobe.com/)
+ * @copyright Copyright (C) 2019, 2020 DigitalGlobe (http://www.digitalglobe.com/)
  */
 
 //  Hoot
@@ -30,6 +30,10 @@
 #include <hoot/core/cmd/BaseCommand.h>
 #include <hoot/core/io/IoUtils.h>
 #include <hoot/core/util/Factory.h>
+#include <hoot/core/util/StringUtils.h>
+
+// Qt
+#include <QElapsedTimer>
 
 using namespace std;
 
@@ -47,10 +51,13 @@ public:
   virtual QString getName() const override { return "split-map"; }
 
   virtual QString getDescription() const override
-  { return "Split a map geospatially into tiled maps."; }
+  { return "Split a map geospatially into tiled maps"; }
 
   virtual int runSimple(QStringList& args) override
   {
+    QElapsedTimer timer;
+    timer.start();
+
     if (args.size() != 3)
     {
       LOG_VARD(args);
@@ -58,6 +65,7 @@ public:
       throw HootException(QString("%1 takes three parameters.").
                           arg(getName()));
     }
+
     //  Load the tile map ignoring the file IDs
     OsmMapPtr tile_map(new OsmMap());
     IoUtils::loadMap(tile_map, args[0], false);
@@ -74,6 +82,8 @@ public:
     //  Write the maps out to disk
     mapSplitter.writeMaps(args[2]);
 
+    LOG_STATUS("Map split in " << StringUtils::millisecondsToDhms(timer.elapsed()) << " total.");
+
     return 0;
   }
 };
Clone this wiki locally