-
Notifications
You must be signed in to change notification settings - Fork 74
v0.2.54..v0.2.55 changeset PowerLine.js
Garret Voltz edited this page Aug 14, 2020
·
1 revision
diff --git a/rules/PowerLine.js b/rules/PowerLine.js
index f140bc1..9b79716 100644
--- a/rules/PowerLine.js
+++ b/rules/PowerLine.js
@@ -12,9 +12,12 @@ exports.candidateDistanceSigma = 1.0; // 1.0 * (CE95 + Worst CE95);
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";
exports.geometryType = "line";
+// This is needed for disabling superfluous conflate ops. In the future, it may also
+// be used to replace exports.isMatchCandidate (see #3047).
+exports.matchCandidateCriterion = "hoot::PowerLineCriterion";
+
var sublineMatcher =
new hoot.MaximalSublineStringMatcher(
{ "way.matcher.max.angle": hoot.get("power.line.matcher.max.angle"),
@@ -57,11 +60,6 @@ exports.calculateSearchRadius = function(map)
* Returns true if e is a candidate for a match. Implementing this method is
* optional, but may dramatically increase speed if you can cull some features
* early on. E.g. no need to check nodes for a polygon to polygon match.
- *
- * exports.matchCandidateCriterion takes precedence over this function and must
- * be commented out before using it.
- *
- * @todo This must be left enabled for now despite exports.matchCandidateCriterion being enabled. See #3047.
*/
exports.isMatchCandidate = function(map, e)
{
@@ -120,10 +118,10 @@ exports.matchScore = function(map, e1, e2)
var weightedMetricDistanceExtractor1Val = weightedMetricDistanceExtractor1.extract(m, m1, m2);
var weightedShapeDistanceExtractor7Val = weightedShapeDistanceExtractor7.extract(m, m1, m2);
- /*hoot.trace("centroidDistanceExtractorVal: " + centroidDistanceExtractorVal);
+ hoot.trace("centroidDistanceExtractorVal: " + centroidDistanceExtractorVal);
hoot.trace("edgeDistanceExtractor1Val: " + edgeDistanceExtractor1Val);
hoot.trace("weightedMetricDistanceExtractor1Val: " + weightedMetricDistanceExtractor1Val);
- hoot.trace("weightedShapeDistanceExtractor7Val: " + weightedShapeDistanceExtractor7Val);*/
+ hoot.trace("weightedShapeDistanceExtractor7Val: " + weightedShapeDistanceExtractor7Val);
if ((centroidDistanceExtractorVal > 0.61 && weightedMetricDistanceExtractor1Val < 1.4) ||
(edgeDistanceExtractor1Val > 0.997 && weightedShapeDistanceExtractor7Val == 0.0))