Skip to content

v0.2.55..v0.2.56 changeset HootLib.js

Garret Voltz edited this page Aug 14, 2020 · 3 revisions
diff --git a/rules/lib/HootLib.js b/rules/lib/HootLib.js
index 02701d0..c3c348f 100644
--- a/rules/lib/HootLib.js
+++ b/rules/lib/HootLib.js
@@ -183,13 +183,21 @@ function isMemberOfRelationInCategory(map, childElementId, schemaCategory)
 }
 
 /**
- * Determines if an element is a member of relation containing a specified tag key
+ * Determines if an element is a member of a relation containing a specified tag key
  */
 function isMemberOfRelationWithTagKey(map, childElementId, tagKey)
 {
   return map.isMemberOfRelationWithTagKey(childElementId, tagKey);
 }
 
+/*
+ * Determines if an element is a member of a relation that satisifies specified criteria
+ */
+function isMemberOfRelationSatisfyingCriterion(map, childElementId, criterionClassName)
+{
+  return map.isMemberOfRelationSatisfyingCriterion(childElementId, criterionClassName);
+}
+
 /**
  * Determines if two features mismatch on non-generic types
  */
@@ -378,22 +386,14 @@ function snapWays(sublineMatcher, map, pairs, replaced, matchedBy)
 }
 
 /**
- * Merges rivers together
+ * Another approach to snapping ways, which allows for using multiple subline matchers. See notes in ?
  */
-function snapRivers(sublineMatcher, map, pairs, replaced, matchedBy, sublineMatcher2)
+function snapWays2(sublineMatcher, map, pairs, replaced, matchedBy, sublineMatcher2)
 {
   return new hoot.HighwaySnapMerger().apply(sublineMatcher, map, pairs, replaced, matchedBy, sublineMatcher2);
 }
 
 /**
- * Determines if a river is considered "long" by River Conflation standards
- */
-function isLongRiverPair(map, e1, e2)
-{
-  return hoot.OsmSchema.isLongRiverPair(map, e1, e2);
-}
-
-/**
  * Uses the SearchRadiusCalculator to automatically calculate a search radius based on tie points found
  * in the two input datasets.
  *
@@ -421,7 +421,7 @@ function isSpecificallyConflatable(map, e, geometryTypeFilter)
   return hoot.OsmSchema.isSpecificallyConflatable(map, e, geometryTypeFilter);
 }
 
-// TODO: All of these is* methods can go away if #3047 is completed.
+// TODO: All of these 'is*' methods can go away if #3047 is completed.
 
 /**
  * Returns true if the specified element is an area element. The approach used
@@ -455,9 +455,9 @@ function isHighway(map, e)
 /**
  * Returns true if the specified element is a polygon element.
  */
-function isPolygon(e)
+function isPolygon(map, e)
 {
-  return hoot.OsmSchema.isPolygon(e);
+  return hoot.OsmSchema.isPolygon(map, e);
 }
 
 /**
@@ -485,9 +485,9 @@ function isBuilding(map, e)
  * See the OSM wiki for more information:
  * http://wiki.openstreetmap.org/wiki/Key:area
  */
-function isLinear(e)
+function isLinear(d)
 {
-  return hoot.OsmSchema.isLinear(e);
+  return hoot.OsmSchema.isLinear(d);
 }
 
 /**
@@ -539,3 +539,11 @@ function getLength(map, e)
 {
   return hoot.ElementConverter.calculateLength(map, e);
 }
+
+/*
+ * Returns the POI match/review distances used by POI to POI Conflation
+ */
+function getPoiSearchRadii()
+{
+  return hoot.PoiSearchRadius.getSearchRadii();
+}
Clone this wiki locally