Skip to content

v0.2.48..v0.2.49 changeset OsmMapReader.h

Garret Voltz edited this page Oct 2, 2019 · 1 revision
diff --git a/hoot-core/src/main/cpp/hoot/core/io/OsmMapReader.h b/hoot-core/src/main/cpp/hoot/core/io/OsmMapReader.h
index 1be0a87..0756e50 100644
--- a/hoot-core/src/main/cpp/hoot/core/io/OsmMapReader.h
+++ b/hoot-core/src/main/cpp/hoot/core/io/OsmMapReader.h
@@ -40,7 +40,7 @@ public:
 
   static std::string className() { return "hoot::OsmMapReader"; }
 
-  OsmMapReader() {}
+  OsmMapReader() : _ignoreDuplicates(false) {}
 
   virtual ~OsmMapReader() {}
 
@@ -84,6 +84,24 @@ public:
    * @return a formats string
    */
   virtual QString supportedFormats() = 0;
+
+  /**
+   * Gets the ignore duplicates flag
+   */
+  bool getIgnoreDuplicates() { return _ignoreDuplicates; }
+
+  /**
+   * Set the ignore duplicates flag, when set to true, derived classes will ignore any element
+   * who's ID is already being used.  This is useful when elements cross bounding box boundaries
+   * and multiple bounding boxes are being merged together.
+   */
+  void setIgnoreDuplicates(bool ignore) { _ignoreDuplicates = ignore; }
+
+protected:
+  /**
+   * Ignore the duplicate IDs or throw an error
+   */
+  bool _ignoreDuplicates;
 };
 
 }
Clone this wiki locally