v0.2.53..v0.2.54 changeset ConflatableElementCriterion.h
Garret Voltz edited this page Mar 31, 2020
·
1 revision
diff --git a/hoot-core/src/main/cpp/hoot/core/criterion/ConflatableElementCriterion.h b/hoot-core/src/main/cpp/hoot/core/criterion/ConflatableElementCriterion.h
index 4d612e7..c351c4e 100644
--- a/hoot-core/src/main/cpp/hoot/core/criterion/ConflatableElementCriterion.h
+++ b/hoot-core/src/main/cpp/hoot/core/criterion/ConflatableElementCriterion.h
@@ -22,13 +22,14 @@
* This will properly maintain the copyright information. DigitalGlobe
* copyrights will be updated automatically.
*
- * @copyright Copyright (C) 2019 DigitalGlobe (http://www.digitalglobe.com/)
+ * @copyright Copyright (C) 2019, 2020 DigitalGlobe (http://www.digitalglobe.com/)
*/
#ifndef CONFLATABLE_ELEMENT_CRITERION_H
#define CONFLATABLE_ELEMENT_CRITERION_H
// hoot
#include <hoot/core/criterion/GeometryTypeCriterion.h>
+#include <hoot/core/elements/OsmMap.h>
namespace hoot
{
@@ -47,34 +48,57 @@ public:
virtual ~ConflatableElementCriterion() {}
/**
+ * Determines whether the criterion represents an element conflatable by a specific machine
+ * learning or rules based conflation routine or one conflatable by a Generic Conflation routine.
+ */
+ virtual bool supportsSpecificConflation() const = 0;
+
+ /**
* Determines which criteria consider an element as conflatable
*
* @param e the element to determine conflatability of
+ * @param map the map containing the input element
+ * @param ignoreGenericConflators if true criterion supporting generic conflation are suppressed
+ * from output
* @return a list of ConflatableElementCriterion class names that consider the element as
* conflatable
*/
- static QStringList getConflatableCriteriaForElement(const ConstElementPtr& e);
+ static QStringList getConflatableCriteriaForElement(const ConstElementPtr& e, ConstOsmMapPtr map,
+ const bool ignoreGenericConflators = true);
/**
* Returns instantiations of conflatable criteria index by class name
*
- * @return a conflatable criteria map
+ * @return a conflatable criteria map of class names to criterion
*/
static QMap<QString, ElementCriterionPtr> getConflatableCriteria();
/**
+ * Returns instantiations of conflatable criteria index by class name
+ *
+ * @param geometryType a geometry type filter; only criteria supporting the specified geometry
+ * type will be returned
+ * @return a conflatable criteria map of class names to criterion
+ */
+ static QMap<QString, ElementCriterionPtr> getConflatableCriteria(
+ const GeometryType& geometryType);
+
+ /**
* Returns all ConflatableElementCriterion class names for a given geometry type
*
- * @param type geometry type
+ * @param geometryType geometry type
* @return a list of class names inheriting from ConflatableElementCriterion
*/
- static QStringList getCriterionClassNamesByType(const GeometryType& type);
+ static QStringList getCriterionClassNamesByGeometryType(const GeometryType& geometryType);
private:
// criterion class names to criterion objects
static QMap<QString, ElementCriterionPtr> _conflatableCriteria;
+ // geometry type string to a map of criterion class names to criterion objects
+ static QMap<QString, QMap<QString, ElementCriterionPtr>> _conflatableCriteriaByGeometryType;
+
static void _createConflatableCriteria();
};