Skip to content

v0.2.52..v0.2.53 changeset HighwayTagOnlyMerger.cpp

Garret Voltz edited this page Feb 12, 2020 · 1 revision
diff --git a/hoot-core/src/main/cpp/hoot/core/conflate/highway/HighwayTagOnlyMerger.cpp b/hoot-core/src/main/cpp/hoot/core/conflate/highway/HighwayTagOnlyMerger.cpp
index e16fdfa..57d7037 100644
--- a/hoot-core/src/main/cpp/hoot/core/conflate/highway/HighwayTagOnlyMerger.cpp
+++ b/hoot-core/src/main/cpp/hoot/core/conflate/highway/HighwayTagOnlyMerger.cpp
@@ -22,7 +22,7 @@
  * This will properly maintain the copyright information. DigitalGlobe
  * copyrights will be updated automatically.
  *
- * @copyright Copyright (C) 2019 DigitalGlobe (http://www.digitalglobe.com/)
+ * @copyright Copyright (C) 2019, 2020 DigitalGlobe (http://www.digitalglobe.com/)
  */
 #include "HighwayTagOnlyMerger.h"
 
@@ -36,6 +36,7 @@
 #include <hoot/core/util/ConfigOptions.h>
 #include <hoot/core/util/Factory.h>
 #include <hoot/core/util/Log.h>
+#include <hoot/core/conflate/highway/HighwayMatch.h>
 
 namespace hoot
 {
@@ -199,7 +200,12 @@ bool HighwayTagOnlyMerger::_mergeWays(ElementPtr elementWithTagsToKeep,
     mergedTags.remove(MetadataTags::HootMultilineString());
   }
   elementWithTagsToKeep->setTags(mergedTags);
-  elementWithTagsToKeep->setStatus(Status::Conflated);;
+  elementWithTagsToKeep->setStatus(Status::Conflated);
+  ConfigOptions conf;
+  if (conf.getWriterIncludeDebugTags() && conf.getWriterIncludeMatchedByTag())
+  {
+    elementWithTagsToKeep->setTag(MetadataTags::HootMatchedBy(), HighwayMatch::MATCH_NAME);
+  }
   LOG_TRACE(
     "HighwayTagOnlyMerger: keeper element\n" <<
     OsmUtils::getElementDetailString(elementWithTagsToKeep, map));
Clone this wiki locally