Skip to content

v0.2.53..v0.2.54 changeset OsmXmlWriter.cpp

Garret Voltz edited this page Mar 31, 2020 · 1 revision
diff --git a/hoot-core/src/main/cpp/hoot/core/io/OsmXmlWriter.cpp b/hoot-core/src/main/cpp/hoot/core/io/OsmXmlWriter.cpp
index 401c70e..0e42ea6 100644
--- a/hoot-core/src/main/cpp/hoot/core/io/OsmXmlWriter.cpp
+++ b/hoot-core/src/main/cpp/hoot/core/io/OsmXmlWriter.cpp
@@ -22,7 +22,7 @@
  * 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/)
  */
 #include "OsmXmlWriter.h"
 
@@ -353,6 +353,10 @@ void OsmXmlWriter::_writeNodes(ConstOsmMapPtr map)
   }
 
   // sort the values to give consistent results.
+  if (nids.size() > 100000)
+  {
+    LOG_INFO("Sorting nodes...");
+  }
   qSort(nids.begin(), nids.end(), qLess<long>());
   for (int i = 0; i < nids.size(); i++)
   {
@@ -370,6 +374,10 @@ void OsmXmlWriter::_writeWays(ConstOsmMapPtr map)
   }
 
   // sort the values to give consistent results.
+  if (wids.size() > 100000)
+  {
+    LOG_INFO("Sorting ways...");
+  }
   qSort(wids.begin(), wids.end(), qLess<long>());
   for (int i = 0; i < wids.size(); i++)
   {
@@ -396,6 +404,10 @@ void OsmXmlWriter::_writeRelations(ConstOsmMapPtr map)
   }
 
   // sort the values to give consistent results.
+  if (rids.size() > 100000)
+  {
+    LOG_INFO("Sorting relations...");
+  }
   qSort(rids.begin(), rids.end(), qLess<long>());
   for (int i = 0; i < rids.size(); i++)
   {
Clone this wiki locally