Skip to content

v0.2.52..v0.2.53 changeset IoUtils.cpp

Garret Voltz edited this page Feb 12, 2020 · 1 revision
diff --git a/hoot-core/src/main/cpp/hoot/core/io/IoUtils.cpp b/hoot-core/src/main/cpp/hoot/core/io/IoUtils.cpp
index e97be9c..adeb288 100644
--- a/hoot-core/src/main/cpp/hoot/core/io/IoUtils.cpp
+++ b/hoot-core/src/main/cpp/hoot/core/io/IoUtils.cpp
@@ -22,7 +22,7 @@
  * This will properly maintain the copyright information. DigitalGlobe
  * copyrights will be updated automatically.
  *
- * @copyright Copyright (C) 2018, 2019 DigitalGlobe (http://www.digitalglobe.com/)
+ * @copyright Copyright (C) 2018, 2019, 2020 DigitalGlobe (http://www.digitalglobe.com/)
  */
 
 #include "IoUtils.h"
@@ -148,6 +148,7 @@ void IoUtils::loadMap(const OsmMapPtr& map, const QString& path, bool useFileId,
     OgrReader reader;
     reader.setDefaultStatus(defaultStatus);
     reader.read(justPath, pathLayer.size() > 1 ? pathLayer[1] : "", map);
+    reader.close();
   }
   else
   {
@@ -155,6 +156,15 @@ void IoUtils::loadMap(const OsmMapPtr& map, const QString& path, bool useFileId,
   }
 }
 
+void IoUtils::loadMaps(const OsmMapPtr& map, const QStringList& paths, bool useFileId,
+                       Status defaultStatus)
+{
+  for (int i = 0; i < paths.size(); i++)
+  {
+    loadMap(map, paths.at(i), useFileId, defaultStatus);
+  }
+}
+
 // TODO: Get rid of this??
 void IoUtils::saveMap(const OsmMapPtr& map, const QString& path)
 {
Clone this wiki locally