Skip to content

v0.2.50..v0.2.51 changeset OsmSchema.h

Garret Voltz edited this page Jan 15, 2020 · 1 revision
diff --git a/hoot-core/src/main/cpp/hoot/core/schema/OsmSchema.h b/hoot-core/src/main/cpp/hoot/core/schema/OsmSchema.h
index fb5ff5f..a09ca84 100644
--- a/hoot-core/src/main/cpp/hoot/core/schema/OsmSchema.h
+++ b/hoot-core/src/main/cpp/hoot/core/schema/OsmSchema.h
@@ -248,13 +248,10 @@ public:
   virtual ~OsmSchema();
 
   void addAssociatedWith(const QString& name1, const QString& name2);
-
   void addIsA(const QString& name1, const QString& name2);
-
   void addSimilarTo(const QString& name1, const QString& name2, double weight, bool oneway = false);
 
   QString average(const QString& kvp1, double w1, const QString& kvp2, double w2, double& best);
-
   QString average(const QString& kvp1, const QString& kvp2, double& best);
 
   /**
@@ -269,7 +266,6 @@ public:
   const SchemaVertex& getFirstCommonAncestor(const QString& kvp1, const QString& kvp2);
 
   std::vector<SchemaVertex> getAssociatedTagsAsVertices(const QString& name);
-
   /**
    * Retrieves a set of tags that are associated with the input tags, as defined by the hoot schema
    *
@@ -401,6 +397,15 @@ public:
   double score(const SchemaVertex& v1, const SchemaVertex& v2);
 
   /**
+   * Scores a particular kvp against an element's tags
+   *
+   * @param kvp the key/value pair to compare against
+   * @param tags the tags to compare against
+   * @return the highest similarity score found in tags when compared to kvp
+   */
+  double score(const QString& kvp, const Tags& tags);
+
+  /**
    * @brief scoreOneWay Returns a oneway score. E.g. highway=primary is similar to highway=road,
    *  but a highway=road isn't necessarily similar to a highway=primary (so it gets a low score).
    */
Clone this wiki locally