Skip to content

v0.2.52..v0.2.53 changeset PowerLine.js

Garret Voltz edited this page Feb 12, 2020 · 1 revision
diff --git a/rules/PowerLine.js b/rules/PowerLine.js
index 3722644..aa889f8 100644
--- a/rules/PowerLine.js
+++ b/rules/PowerLine.js
@@ -1,3 +1,7 @@
+/**
+ * This script conflates power lines using Generic Conflation.
+ */
+
 "use strict";
 
 exports.description = "Matches power lines";
@@ -5,11 +9,11 @@ exports.experimental = false;
 exports.baseFeatureType = "PowerLine";
 
 exports.candidateDistanceSigma = 1.0; // 1.0 * (CE95 + Worst CE95);
-exports.matchThreshold = parseFloat(hoot.get("conflate.match.threshold.default"));
-exports.missThreshold = parseFloat(hoot.get("conflate.miss.threshold"));
-exports.reviewThreshold = parseFloat(hoot.get("conflate.review.threshold"));
-// See #3047
-exports.matchCandidateCriterion = "hoot::PowerLineCriterion";
+exports.matchThreshold = parseFloat(hoot.get("power.line.match.threshold"));
+exports.missThreshold = parseFloat(hoot.get("power.line.miss.threshold"));
+exports.reviewThreshold = parseFloat(hoot.get("power.line.review.threshold"));
+exports.matchCandidateCriterion = "hoot::PowerLineCriterion"; // See #3047
+exports.geometryType = "line";
 
 var sublineMatcher =
   new hoot.MaximalSublineStringMatcher(
@@ -44,7 +48,7 @@ exports.calculateSearchRadius = function(map)
   }
   else
   {
-    exports.searchRadius = parseFloat(hoot.get("search.radius.default"));
+    exports.searchRadius = parseFloat(hoot.get("search.radius.power.line"));
     hoot.log("Using specified search radius for power line conflation: " + exports.searchRadius);
   }
 }
@@ -190,7 +194,7 @@ exports.mergeSets = function(map, pairs, replaced)
   hoot.trace("Merging elements.");
   // snap the ways in the second input to the first input. Use the default tag
   // merge method.
-  return snapWays(sublineMatcher, map, pairs, replaced);
+  return snapWays(sublineMatcher, map, pairs, replaced, exports.baseFeatureType);
 };
 
 exports.getMatchFeatureDetails = function(map, e1, e2)
Clone this wiki locally