v0.2.53..v0.2.54 changeset TagFilteredDifferencer.cpp
Garret Voltz edited this page Mar 31, 2020
·
1 revision
diff --git a/hoot-core/src/main/cpp/hoot/core/schema/TagFilteredDifferencer.cpp b/hoot-core/src/main/cpp/hoot/core/schema/TagFilteredDifferencer.cpp
index 4260a37..b02e68f 100644
--- a/hoot-core/src/main/cpp/hoot/core/schema/TagFilteredDifferencer.cpp
+++ b/hoot-core/src/main/cpp/hoot/core/schema/TagFilteredDifferencer.cpp
@@ -22,7 +22,7 @@
* This will properly maintain the copyright information. DigitalGlobe
* copyrights will be updated automatically.
*
- * @copyright Copyright (C) 2015, 2017 DigitalGlobe (http://www.digitalglobe.com/)
+ * @copyright Copyright (C) 2015, 2017, 2020 DigitalGlobe (http://www.digitalglobe.com/)
*/
#include "TagFilteredDifferencer.h"
@@ -40,6 +40,8 @@ TagFilteredDifferencer::TagFilteredDifferencer()
double TagFilteredDifferencer::diff(const ConstOsmMapPtr&, const ConstElementPtr& e1,
const ConstElementPtr& e2) const
{
+ //const ElementId debugId = ElementId(ElementType::Way, -857);
+
OsmSchema& schema = OsmSchema::getInstance();
vector<SchemaVertex> v1 = schema.getUniqueSchemaVertices(e1->getTags());
@@ -55,11 +57,25 @@ double TagFilteredDifferencer::diff(const ConstOsmMapPtr&, const ConstElementPtr
{
if (isValidTag(v2[j]))
{
- result = min(1 - schema.score(v1[i], v2[j]), result);
+ const double score = 1 - schema.score(v1[i], v2[j]);
+
+// if (e1->getElementId() == debugId || e2->getElementId() == debugId)
+// {
+// LOG_TRACE("Diff between: " << v1[i].name << " and " << v2[j].name << ": " << score);
+// }
+
+ result = min(score, result);
}
}
}
- }
+ }
+
+// if (e1->getElementId() == debugId || e2->getElementId() == debugId)
+// {
+// LOG_TRACE(
+// "Final diff between: " << e1->getElementId() << " and " << e2->getElementId() << ": " <<
+// result);
+// }
return result;
}