Skip to content

v0.2.49..v0.2.50 changeset IntersectionSplitter.cpp

Garret Voltz edited this page Nov 6, 2019 · 1 revision
diff --git a/hoot-core/src/main/cpp/hoot/core/algorithms/splitter/IntersectionSplitter.cpp b/hoot-core/src/main/cpp/hoot/core/algorithms/splitter/IntersectionSplitter.cpp
index 017ff84..e7f55f6 100644
--- a/hoot-core/src/main/cpp/hoot/core/algorithms/splitter/IntersectionSplitter.cpp
+++ b/hoot-core/src/main/cpp/hoot/core/algorithms/splitter/IntersectionSplitter.cpp
@@ -96,7 +96,7 @@ void IntersectionSplitter::_mapNodesToWays()
     {
       const set<long>& relations =
         _map->getIndex().getElementToRelationMap()->getRelationByElement(w->getElementId());
-
+      LOG_VART(relations.size());
       foreach (long rid, relations)
       {
         ElementPtr r = _map->getRelation(rid);
@@ -107,6 +107,8 @@ void IntersectionSplitter::_mapNodesToWays()
       }
     }
 
+    LOG_VART(w->getElementId());
+    LOG_VART(isNetworkType);
     if (isNetworkType)
     {
       _mapNodesToWay(w);
@@ -138,8 +140,8 @@ void IntersectionSplitter::splitIntersections()
   _mapNodesToWays();
 
   // go through all the nodes
-  int totalNodes = _todoNodes.size();
   int numProcessed = 0;
+  const int taskStatusUpdateInterval = ConfigOptions().getTaskStatusUpdateInterval();
   while (_todoNodes.isEmpty() == false)
   {
     long nodeId = *_todoNodes.begin();
@@ -147,11 +149,12 @@ void IntersectionSplitter::splitIntersections()
     _todoNodes.remove(nodeId);
     numProcessed++;
 
-    if (_todoNodes.size() % 1000 == 0 && _todoNodes.size() > 0)
+    if (numProcessed % (taskStatusUpdateInterval * 10) == 0 && _todoNodes.size() > 0)
     {
       PROGRESS_INFO(
-        "\tProcessed intersection splits for: " << StringUtils::formatLargeNumber(numProcessed) <<
-        " / " << StringUtils::formatLargeNumber(totalNodes) << " nodes.");
+        "\tCreated  " <<  StringUtils::formatLargeNumber(numProcessed) <<
+        " intersection splits. " << StringUtils::formatLargeNumber(_todoNodes.size()) <<
+        " remaining nodes to process.");
     }
 
     // if the node is part of two or more ways
Clone this wiki locally