-
Notifications
You must be signed in to change notification settings - Fork 74
v0.2.49..v0.2.50 changeset PoiPolygonMatch.h
Garret Voltz edited this page Nov 6, 2019
·
1 revision
diff --git a/hoot-core/src/main/cpp/hoot/core/conflate/poi-polygon/PoiPolygonMatch.h b/hoot-core/src/main/cpp/hoot/core/conflate/poi-polygon/PoiPolygonMatch.h
index 1d2045c..b7bd3fd 100644
--- a/hoot-core/src/main/cpp/hoot/core/conflate/poi-polygon/PoiPolygonMatch.h
+++ b/hoot-core/src/main/cpp/hoot/core/conflate/poi-polygon/PoiPolygonMatch.h
@@ -43,6 +43,10 @@
#include <hoot/core/util/Configurable.h>
#include <hoot/core/criterion/poi-polygon/PoiPolygonPoiCriterion.h>
#include <hoot/core/criterion/poi-polygon/PoiPolygonPolyCriterion.h>
+#include <hoot/core/conflate/poi-polygon/PoiPolygonCache.h>
+
+// Qt
+#include <QElapsedTimer>
namespace hoot
{
@@ -65,6 +69,7 @@ public:
PoiPolygonMatch(ConstMatchThresholdPtr threshold);
PoiPolygonMatch(const ConstOsmMapPtr& map, ConstMatchThresholdPtr threshold,
std::shared_ptr<const PoiPolygonRfClassifier> rf,
+ PoiPolygonCachePtr infoCache,
const std::set<ElementId>& polyNeighborIds = std::set<ElementId>(),
const std::set<ElementId>& poiNeighborIds = std::set<ElementId>());
@@ -83,7 +88,7 @@ public:
virtual double getProbability() const override { return _class.getMatchP(); }
// Is the right implementation for this?
- virtual bool isConflicting(const Match& /*other*/, const ConstOsmMapPtr& /*map*/) const override
+ virtual bool isConflicting(const ConstMatchPtr& /*other*/, const ConstOsmMapPtr& /*map*/) const override
{ return false; }
virtual bool isWholeGroup() const override { return true; }
@@ -141,6 +146,7 @@ public:
static long phoneNumbersProcesed;
static long phoneNumberMatchCandidates;
static long convexPolyDistanceMatches;
+ static long numReviewReductions;
private:
@@ -152,7 +158,7 @@ private:
ElementId _eid1;
ElementId _eid2;
- ConstElementPtr _poi;
+ ConstNodePtr _poi;
ConstElementPtr _poly;
std::shared_ptr<geos::geom::Geometry> _poiGeom;
std::shared_ptr<geos::geom::Geometry> _polyGeom;
@@ -194,8 +200,10 @@ private:
double _phoneNumberScore;
bool _phoneNumberMatchEnabled;
- //These are only used by PoiPolygonCustomRules and PoiPolygonDistance
+ //These two are used by PoiPolygonReviewReducer and PoiPolygonDistance
+ // all the polys within the search radius of the POI being matched
std::set<ElementId> _polyNeighborIds;
+ // all the pois within the search radius of the POI being matched
std::set<ElementId> _poiNeighborIds;
MatchClassification _class;
@@ -218,6 +226,10 @@ private:
PoiPolygonPoiCriterion _poiCrit;
PoiPolygonPolyCriterion _polyCrit;
+ std::shared_ptr<QElapsedTimer> _timer;
+
+ PoiPolygonCachePtr _infoCache;
+
void _categorizeElementsByGeometryType();
bool _inputFeaturesHaveSameSource() const;