v0.2.52..v0.2.53 changeset PoiPolygonMatchVisitor.h
Garret Voltz edited this page Feb 12, 2020
·
1 revision
diff --git a/hoot-core/src/main/cpp/hoot/core/visitors/poi-polygon/PoiPolygonMatchVisitor.h b/hoot-core/src/main/cpp/hoot/core/visitors/poi-polygon/PoiPolygonMatchVisitor.h
index c9dcbe9..e30b261 100644
--- a/hoot-core/src/main/cpp/hoot/core/visitors/poi-polygon/PoiPolygonMatchVisitor.h
+++ b/hoot-core/src/main/cpp/hoot/core/visitors/poi-polygon/PoiPolygonMatchVisitor.h
@@ -22,7 +22,7 @@
* This will properly maintain the copyright information. DigitalGlobe
* copyrights will be updated automatically.
*
- * @copyright Copyright (C) 2016, 2017, 2018, 2019 DigitalGlobe (http://www.digitalglobe.com/)
+ * @copyright Copyright (C) 2016, 2017, 2018, 2019, 2020 DigitalGlobe (http://www.digitalglobe.com/)
*/
#ifndef POIPOLYGONMATCHVISITOR_H
#define POIPOLYGONMATCHVISITOR_H
@@ -35,11 +35,14 @@
#include <hoot/core/conflate/poi-polygon/PoiPolygonRfClassifier.h>
#include <hoot/core/criterion/poi-polygon/PoiPolygonPolyCriterion.h>
#include <hoot/core/criterion/poi-polygon/PoiPolygonPoiCriterion.h>
-#include <hoot/core/conflate/poi-polygon/PoiPolygonCache.h>
+#include <hoot/core/conflate/poi-polygon/PoiPolygonInfoCache.h>
// tgs
#include <tgs/RStarTree/HilbertRTree.h>
+// Qt
+#include <QElapsedTimer>
+
namespace hoot
{
@@ -55,7 +58,7 @@ public:
ElementCriterionPtr filter = ElementCriterionPtr());
PoiPolygonMatchVisitor(const ConstOsmMapPtr& map, std::vector<ConstMatchPtr>& result,
ConstMatchThresholdPtr threshold,
- std::shared_ptr<PoiPolygonRfClassifier> rf, PoiPolygonCachePtr infoCache,
+ std::shared_ptr<PoiPolygonRfClassifier> rf, PoiPolygonInfoCachePtr infoCache,
ElementCriterionPtr filter = ElementCriterionPtr());
~PoiPolygonMatchVisitor();
@@ -87,18 +90,12 @@ private:
size_t _maxGroupSize;
ConstMatchThresholdPtr _threshold;
- std::shared_ptr<Tgs::HilbertRTree> _polyIndex; // used for finding surrounding polys
+ // used for finding surrounding polys
+ std::shared_ptr<Tgs::HilbertRTree> _polyIndex;
std::deque<ElementId> _polyIndexToEid;
- std::set<ElementId> _surroundingPolyIds;
- std::shared_ptr<Tgs::HilbertRTree> _poiIndex; // used for finding surrounding poi's
- std::deque<ElementId> _poiIndexToEid;
- std::set<ElementId> _surroundingPoiIds;
std::shared_ptr<PoiPolygonRfClassifier> _rf;
- bool _enableAdvancedMatching;
- bool _enableReviewReduction;
-
double _reviewDistanceThreshold;
long _numElementsVisited;
@@ -109,15 +106,16 @@ private:
PoiPolygonPolyCriterion _polyCrit;
ElementCriterionPtr _filter;
- PoiPolygonCachePtr _infoCache;
+ PoiPolygonInfoCachePtr _infoCache;
+
+ QElapsedTimer _timer;
- void _checkForMatch(const std::shared_ptr<const Element>& e);
- void _collectSurroundingPolyIds(const std::shared_ptr<const Element>& e);
- void _collectSurroundingPoiIds(const std::shared_ptr<const Element>& e);
+ void _checkForMatch(const std::shared_ptr<const Element>& e,
+ const std::set<ElementId>& surroundingPolyIds);
+ std::set<ElementId> _collectSurroundingPolyIds(const std::shared_ptr<const Element>& e);
Meters _getSearchRadius(const std::shared_ptr<const Element>& e) const;
std::shared_ptr<Tgs::HilbertRTree>& _getPolyIndex();
- std::shared_ptr<Tgs::HilbertRTree>& _getPoiIndex();
ConstOsmMapPtr _getMap() { return _map; }
};