v0.2.54..v0.2.55 changeset EvalPointMovesCmd.cpp
Garret Voltz edited this page Aug 14, 2020
·
1 revision
diff --git a/hoot-rnd/src/main/cpp/hoot/rnd/cmd/EvalPointMovesCmd.cpp b/hoot-rnd/src/main/cpp/hoot/rnd/cmd/EvalPointMovesCmd.cpp
index 91b338d..6801b8c 100644
--- a/hoot-rnd/src/main/cpp/hoot/rnd/cmd/EvalPointMovesCmd.cpp
+++ b/hoot-rnd/src/main/cpp/hoot/rnd/cmd/EvalPointMovesCmd.cpp
@@ -22,15 +22,13 @@
* 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/)
*/
// Boost
#include <boost/random/uniform_int.hpp>
// Hoot
-#include <hoot/core/util/Factory.h>
-#include <hoot/core/util/MapProjector.h>
#include <hoot/core/cmd/BaseCommand.h>
#include <hoot/core/io/OgrReader.h>
#include <hoot/core/io/OsmXmlReader.h>
@@ -38,13 +36,18 @@
#include <hoot/core/io/OsmPbfReader.h>
#include <hoot/core/io/OsmPbfWriter.h>
#include <hoot/core/io/ShapefileWriter.h>
+#include <hoot/core/util/Factory.h>
+#include <hoot/core/util/FileUtils.h>
#include <hoot/core/util/GeometryUtils.h>
#include <hoot/core/util/Log.h>
+#include <hoot/core/util/MapProjector.h>
#include <hoot/core/visitors/CalculateMapBoundsVisitor.h>
+#include <hoot/core/util/StringUtils.h>
// Qt
#include <QDir>
#include <QFile>
+#include <QElapsedTimer>
// Tgs
#include <tgs/Statistics/Random.h>
@@ -191,6 +194,9 @@ public:
virtual int runSimple(QStringList& args) override
{
+ QElapsedTimer timer;
+ timer.start();
+
if (args.size() != 3)
{
cout << getHelp() << endl << endl;
@@ -205,7 +211,7 @@ public:
}
Envelope bounds = parseEnvelope(args[1]);
QString workingDir = args[2];
- QDir(".").mkpath(workingDir);
+ FileUtils::makeDir(workingDir);
OsmMapPtr map(new OsmMap());
@@ -272,6 +278,9 @@ public:
compareMaps(map, shpTransform(map, workingDir), pointCount).print();
cout << endl;
+ LOG_STATUS(
+ "Point moves evaluated in " << StringUtils::millisecondsToDhms(timer.elapsed()) << " total.");
+
return 0;
}
};