Skip to content

v0.2.54..v0.2.55 changeset Railway.js

Garret Voltz edited this page Aug 14, 2020 · 1 revision
diff --git a/rules/Railway.js b/rules/Railway.js
index 32bcab1..f565849 100644
--- a/rules/Railway.js
+++ b/rules/Railway.js
@@ -10,12 +10,18 @@ exports.baseFeatureType = "Railway";
 exports.geometryType = "line";
 
 exports.candidateDistanceSigma = 1.0; // 1.0 * (CE95 + Worst CE95);
+
+exports.searchRadius = parseFloat(hoot.get("search.radius.railway"));
+
 // This matcher only sets match/miss/review values to 1.0, therefore the score thresholds aren't used. 
 // If that ever changes, then the generic score threshold configuration options used below should 
 // be replaced with custom score threshold configuration options.
 exports.matchThreshold = parseFloat(hoot.get("conflate.match.threshold.default"));
 exports.missThreshold = parseFloat(hoot.get("conflate.miss.threshold.default"));
 exports.reviewThreshold = parseFloat(hoot.get("conflate.review.threshold.default"));
+
+// 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::RailwayCriterion";
 
 var sublineMatcher =
@@ -33,21 +39,9 @@ var parallelScoreExtractor = new hoot.ParallelScoreExtractor();
 var lengthScoreExtractor = new hoot.LengthScoreExtractor();
 
 /**
- * Runs before match creation occurs and provides an opportunity to perform custom initialization.
- */
-exports.calculateSearchRadius = function(map)
-{
-  exports.searchRadius = parseFloat(hoot.get("search.radius.railway"));
-  hoot.log("Using specified search radius for railway conflation: " + exports.searchRadius);
-}
-
-/**
  * 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.
  */
 exports.isMatchCandidate = function(map, e)
 {
Clone this wiki locally