-
Notifications
You must be signed in to change notification settings - Fork 74
v0.2.49..v0.2.50 changeset DiffConflator.h
Garret Voltz edited this page Nov 6, 2019
·
1 revision
diff --git a/hoot-core/src/main/cpp/hoot/core/conflate/DiffConflator.h b/hoot-core/src/main/cpp/hoot/core/conflate/DiffConflator.h
index 40419ea..56b4cc2 100644
--- a/hoot-core/src/main/cpp/hoot/core/conflate/DiffConflator.h
+++ b/hoot-core/src/main/cpp/hoot/core/conflate/DiffConflator.h
@@ -28,17 +28,18 @@
#define DIFFCONFLATOR_H
// hoot
-#include <hoot/core/elements/OsmMap.h>
#include <hoot/core/algorithms/changeset/ChangesetDeriver.h>
#include <hoot/core/algorithms/changeset/MemChangesetProvider.h>
+#include <hoot/core/conflate/matching/Match.h>
#include <hoot/core/conflate/matching/MatchGraph.h>
+#include <hoot/core/elements/OsmMap.h>
+#include <hoot/core/info/SingleStat.h>
#include <hoot/core/io/Serializable.h>
#include <hoot/core/ops/OsmMapOperation.h>
#include <hoot/core/util/Boundable.h>
-#include <hoot/core/info/SingleStat.h>
#include <hoot/core/util/Configurable.h>
-#include <hoot/core/util/Settings.h>
#include <hoot/core/util/ProgressReporter.h>
+#include <hoot/core/util/Settings.h>
// tgs
#include <tgs/HashMap.h>
@@ -49,7 +50,6 @@
namespace hoot
{
-class Match;
class MatchFactory;
class MatchThreshold;
@@ -137,9 +137,9 @@ public:
virtual QString getDescription() const
{ return "Conflates two maps into a single map based on the difference between the inputs"; }
- // Gets the tag differential between the maps. To do this, we look through all
- // of the matches, and compare tags. A set of newer tags is returned as a
- // changeset (because updating the tags requires a modify operation)
+ // Gets the tag differential between the maps. To do this, we look through all of the matches,
+ // and compare tags. A set of newer tags is returned as a changeset (because updating the tags
+ // requires a modify operation)
/**
* @brief getTagDiff - Gets the tag differential that was calculated during the
@@ -189,7 +189,7 @@ private:
bool _conflateTags = false;
// Stores the matches we found
- std::vector<const Match*> _matches;
+ std::vector<ConstMatchPtr> _matches;
// Stores stats calcuated during conflation
QList<SingleStat> _stats;
@@ -197,24 +197,14 @@ private:
// Stores the changes we calculate when doing the tag differential
MemChangesetProviderPtr _pTagChanges;
- // A copy of the "Input1" map. This is used when calculating the tag
- // differential. It's important, because elements get modified by map
- // cleaning operations prior to conflation - and we need this as a reference
- // for original IDs and original geometry, so that we can generate a clean
+ // A copy of the "Input1" map. This is used when calculating the tag differential. It's important,
+ // because elements get modified by map cleaning operations prior to conflation - and we need this
+ // as a reference for original IDs and original geometry, so that we can generate a clean
// changeset output for the tag diff.
OsmMapPtr _pOriginalMap;
Progress _progress;
-
- template <typename InputCollection>
- void _deleteAll(InputCollection& ic)
- {
- for (typename InputCollection::const_iterator it = ic.begin(); it != ic.end(); ++it)
- {
- delete *it;
- }
- ic.clear();
- }
+ int _taskStatusUpdateInterval;
/**
* Cleans up any resources used by the object during conflation. This also makes exceptions that
@@ -222,18 +212,18 @@ private:
*/
void _reset();
- void _validateConflictSubset(const ConstOsmMapPtr& map, std::vector<const Match*> matches);
+ void _validateConflictSubset(const ConstOsmMapPtr& map, std::vector<ConstMatchPtr> matches);
- void _printMatches(std::vector<const Match*> matches);
- void _printMatches(std::vector<const Match*> matches, const MatchType& typeFilter);
+ void _printMatches(std::vector<ConstMatchPtr> matches);
+ void _printMatches(std::vector<ConstMatchPtr> matches, const MatchType& typeFilter);
ChangesetProviderPtr _getChangesetFromMap(OsmMapPtr pMap);
// Calculates and stores the tag differential as a set of change objects
void _calcAndStoreTagChanges();
- // Decides if the newTags should replace the oldTags. Among other things,
- // it checks the differential.tag.ignore.list
+ // Decides if the newTags should replace the oldTags. Among other things, it checks the
+ // differential.tag.ignore.list
bool _tagsAreDifferent(const Tags& oldTags, const Tags& newTags);
// Creates a change object using the original element and new tags