Skip to content

v0.2.48..v0.2.49 changeset LinearCriterion.h

Garret Voltz edited this page Oct 2, 2019 · 1 revision
diff --git a/hoot-core/src/main/cpp/hoot/core/criterion/LinearCriterion.h b/hoot-core/src/main/cpp/hoot/core/criterion/LinearCriterion.h
index 98e5cd0..f25641c 100644
--- a/hoot-core/src/main/cpp/hoot/core/criterion/LinearCriterion.h
+++ b/hoot-core/src/main/cpp/hoot/core/criterion/LinearCriterion.h
@@ -28,7 +28,8 @@
 #ifndef LINEARCRITERION_H
 #define LINEARCRITERION_H
 
-#include <hoot/core/criterion/ElementCriterion.h>
+// Hoot
+#include <hoot/core/criterion/GeometryTypeCriterion.h>
 
 namespace hoot
 {
@@ -36,18 +37,25 @@ namespace hoot
 /**
  * Identifies linear features
  */
-class LinearCriterion : public ElementCriterion
+class LinearCriterion : public GeometryTypeCriterion
 {
 public:
+
   static std::string className() { return "hoot::LinearCriterion"; }
 
-  LinearCriterion() {}
+  LinearCriterion();
 
   virtual bool isSatisfied(const ConstElementPtr& e) const override;
 
   virtual ElementCriterionPtr clone() { return ElementCriterionPtr(new LinearCriterion()); }
 
   virtual QString getDescription() const { return "Identifies linear features"; }
+
+  virtual GeometryType getGeometryType() const { return GeometryType::Line; }
+
+  virtual QString toString() const override
+  { return QString::fromStdString(className()).remove("hoot::"); }
+
 };
 
 }
Clone this wiki locally