Skip to content

v0.2.53..v0.2.54 changeset PoiPolygonMatch.cpp

Garret Voltz edited this page Mar 31, 2020 · 1 revision
diff --git a/hoot-core/src/main/cpp/hoot/core/conflate/poi-polygon/PoiPolygonMatch.cpp b/hoot-core/src/main/cpp/hoot/core/conflate/poi-polygon/PoiPolygonMatch.cpp
index 0ca787d..af9f2d0 100644
--- a/hoot-core/src/main/cpp/hoot/core/conflate/poi-polygon/PoiPolygonMatch.cpp
+++ b/hoot-core/src/main/cpp/hoot/core/conflate/poi-polygon/PoiPolygonMatch.cpp
@@ -26,9 +26,6 @@
  */
 #include "PoiPolygonMatch.h"
 
-// geos
-#include <geos/util/TopologyException.h>
-
 // hoot
 #include <hoot/core/conflate/poi-polygon/PoiPolygonDistanceTruthRecorder.h>
 #include <hoot/core/conflate/poi-polygon/PoiPolygonReviewReducer.h>
@@ -418,7 +415,7 @@ void PoiPolygonMatch::calculateMatch(const ElementId& eid1, const ElementId& eid
   LOG_VART(foundReviewIfMatchedType);
 
   unsigned int evidence = _calculateEvidence(_poi, _poly);
-  LOG_VART(evidence);
+  LOG_VARD(evidence);
 
   bool runReviewReduction = _enableReviewReduction;
   if (// No point in trying to reduce reviews if we're still at a miss here. Also, if the review
@@ -451,7 +448,7 @@ void PoiPolygonMatch::calculateMatch(const ElementId& eid1, const ElementId& eid
     }
     numReviewReductions++;
   }
-  LOG_VART(evidence);
+  LOG_VARD(evidence);
 
   if (evidence >= _matchEvidenceThreshold)
   {
@@ -525,7 +522,7 @@ void PoiPolygonMatch::calculateMatch(const ElementId& eid1, const ElementId& eid
     _explainText = "";
   }
 
-  LOG_TRACE("eid1: " << eid1 << ", eid2: " << eid2 << ", class: " << _class);
+  LOG_DEBUG("eid1: " << eid1 << ", eid2: " << eid2 << ", class: " << _class);
   LOG_TRACE("**************************");
 }
 
@@ -536,7 +533,7 @@ MatchType PoiPolygonMatch::getType() const
 
 unsigned int PoiPolygonMatch::_getDistanceEvidence(ConstElementPtr poi, ConstElementPtr poly)
 {
-  LOG_TRACE("Retrieving distance evidence...");
+  LOG_DEBUG("Retrieving distance evidence...");
 
   _distance = PoiPolygonDistanceExtractor(_infoCache).extract(*_map, poi, poly);
   if (_distance == -1.0)
@@ -586,7 +583,7 @@ unsigned int PoiPolygonMatch::_getDistanceEvidence(ConstElementPtr poi, ConstEle
 unsigned int PoiPolygonMatch::_getConvexPolyDistanceEvidence(ConstElementPtr poi,
                                                              ConstElementPtr poly)
 {
-  LOG_TRACE("Retrieving convex poly distance evidence...");
+  LOG_DEBUG("Retrieving convex poly distance evidence...");
 
   //don't really need to put a distance == -1.0 check here for now, since we're assuming
   //PoiPolygonDistanceExtractor will always be run before this one
@@ -603,7 +600,7 @@ unsigned int PoiPolygonMatch::_getConvexPolyDistanceEvidence(ConstElementPtr poi
 
 unsigned int PoiPolygonMatch::_getTypeEvidence(ConstElementPtr poi, ConstElementPtr poly)
 {
-  LOG_TRACE("Retrieving type evidence...");
+  LOG_DEBUG("Retrieving type evidence...");
 
   _typeScorer->setFeatureDistance(_distance);
   _typeScorer->setTypeScoreThreshold(_typeScoreThreshold);
@@ -645,7 +642,7 @@ unsigned int PoiPolygonMatch::_getTypeEvidence(ConstElementPtr poi, ConstElement
 
 unsigned int PoiPolygonMatch::_getNameEvidence(ConstElementPtr poi, ConstElementPtr poly)
 {
-  LOG_TRACE("Retrieving name evidence...");
+  LOG_DEBUG("Retrieving name evidence...");
 
   _nameScorer.setNameScoreThreshold(_nameScoreThreshold);
   _nameScore = _nameScorer.extract(*_map, poi, poly);
@@ -665,7 +662,7 @@ unsigned int PoiPolygonMatch::_getNameEvidence(ConstElementPtr poi, ConstElement
 
 unsigned int PoiPolygonMatch::_getAddressEvidence(ConstElementPtr poi, ConstElementPtr poly)
 {
-  LOG_TRACE("Retrieving address evidence...");
+  LOG_DEBUG("Retrieving address evidence...");
 
   _addressScore = _addressScorer.extract(*_map, poi, poly);
   const bool addressMatch = _addressScore == 1.0;
@@ -684,7 +681,7 @@ unsigned int PoiPolygonMatch::_getAddressEvidence(ConstElementPtr poi, ConstElem
 
 unsigned int PoiPolygonMatch::_getPhoneNumberEvidence(ConstElementPtr poi, ConstElementPtr poly)
 {
-  LOG_TRACE("Retrieving phone number evidence...");
+  LOG_DEBUG("Retrieving phone number evidence...");
 
   _phoneNumberScore = _phoneNumberScorer.extract(*_map, poi, poly);
   const bool phoneNumberMatch = _phoneNumberScore == 1.0;
@@ -833,5 +830,13 @@ QString PoiPolygonMatch::toString() const
   }
 }
 
+void PoiPolygonMatch::_clearCache()
+{
+  if (_infoCache)
+  {
+    _infoCache->clear();
+  }
+}
+
 }
 
Clone this wiki locally