Skip to content

v0.2.54..v0.2.55 changeset GraphComparator.cpp

Garret Voltz edited this page Aug 14, 2020 · 1 revision
diff --git a/hoot-core/src/main/cpp/hoot/core/scoring/GraphComparator.cpp b/hoot-core/src/main/cpp/hoot/core/scoring/GraphComparator.cpp
index 7e61e20..7594541 100644
--- a/hoot-core/src/main/cpp/hoot/core/scoring/GraphComparator.cpp
+++ b/hoot-core/src/main/cpp/hoot/core/scoring/GraphComparator.cpp
@@ -36,15 +36,16 @@
 using namespace geos::operation::distance;
 
 // Hoot
-#include <hoot/core/algorithms/splitter/WaySplitter.h>
 #include <hoot/core/algorithms/linearreference/LocationOfPoint.h>
 #include <hoot/core/algorithms/splitter/IntersectionSplitter.h>
+#include <hoot/core/algorithms/splitter/WaySplitter.h>
+#include <hoot/core/elements/ElementConverter.h>
 #include <hoot/core/elements/Way.h>
 #include <hoot/core/index/OsmMapIndex.h>
 #include <hoot/core/io/OsmXmlWriter.h>
 #include <hoot/core/scoring/DirectedGraph.h>
 #include <hoot/core/scoring/ShortestPath.h>
-#include <hoot/core/elements/ElementConverter.h>
+#include <hoot/core/util/FileUtils.h>
 #include <hoot/core/util/GeometryPainter.h>
 #include <hoot/core/util/Log.h>
 #include <hoot/core/util/MapProjector.h>
@@ -78,7 +79,8 @@ GraphComparator::GraphComparator(OsmMapPtr map1, OsmMapPtr map2) :
   _init();
 }
 
-cv::Mat GraphComparator::_calculateCostDistance(OsmMapPtr map, Coordinate c, double& maxGraphCost, const RandomPtr& random)
+cv::Mat GraphComparator::_calculateCostDistance(OsmMapPtr map, Coordinate c, double& maxGraphCost,
+                                                const RandomPtr& random)
 {
   // make a copy of the map so we can manipulate it.
   map.reset(new OsmMap(map));
@@ -251,7 +253,7 @@ void GraphComparator::_graphCompareThreadFunc()
       for (size_t j = 0; j < size; ++j)
         diffData[j] = fabs(image1Data[j] - image2Data[j]);
 
-      QDir().mkpath("test-output/route-image");
+      FileUtils::makeDir("test-output/route-image");
       QString s1 = QString("test-output/route-image/route-%1-a.png").arg(info.index, 3, 10, QChar('0'));
       QString s2 = QString("test-output/route-image/route-%1-b.png").arg(info.index, 3, 10, QChar('0'));
       QString sdiff = QString("test-output/route-image/route-%1-diff.png").arg(info.index, 3, 10, QChar('0'));
Clone this wiki locally