diff --git a/rules/Line.js b/rules/Line.js
index 5f24f91..461b8ac 100644
--- a/rules/Line.js
+++ b/rules/Line.js
@@ -7,16 +7,21 @@
exports.candidateDistanceSigma = 1.0; // 1.0 * (CE95 + Worst CE95);
exports.description = "Matches generic lines";
exports.experimental = false;
+
// 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"));
+
exports.searchRadius = parseFloat(hoot.get("search.radius.generic.line"));
exports.tagThreshold = parseFloat(hoot.get("generic.line.tag.threshold"));
exports.baseFeatureType = "Line";
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::LinearCriterion";
var angleHistogramExtractor = new hoot.AngleHistogramExtractor();
@@ -31,9 +36,6 @@ var sublineMatcher = new hoot.MaximalSublineStringMatcher({
* 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)
{
@@ -77,15 +79,15 @@ exports.matchScore = function(map, e1, e2)
return result;
}
- hoot.debug("e1: " + e1.getId() + ", " + e1.getTags().get("name"));
+ hoot.trace("e1: " + e1.getId() + ", " + e1.getTags().get("name"));
if (e1.getTags().get("note"))
{
- hoot.debug("e1 note: " + e1.getTags().get("note"));
+ hoot.trace("e1 note: " + e1.getTags().get("note"));
}
- hoot.debug("e2: " + e2.getId() + ", " + e2.getTags().get("name"));
+ hoot.trace("e2: " + e2.getId() + ", " + e2.getTags().get("name"));
if (e2.getTags().get("note"))
{
- hoot.debug("e2 note: " + e2.getTags().get("note"));
+ hoot.trace("e2 note: " + e2.getTags().get("note"));
}
// TODO: Should we do anything with names?
@@ -93,7 +95,7 @@ exports.matchScore = function(map, e1, e2)
// If both features have types and they aren't just generic types, let's do a detailed type comparison and
// look for an explicit type mismatch. Otherwise, move on to the geometry comparison.
var typeScorePassesThreshold = !explicitTypeMismatch(e1, e2, exports.tagThreshold);
- hoot.debug("typeScorePassesThreshold: " + typeScorePassesThreshold);
+ hoot.trace("typeScorePassesThreshold: " + typeScorePassesThreshold);
if (!typeScorePassesThreshold)
{
return result;
@@ -123,14 +125,14 @@ exports.matchScore = function(map, e1, e2)
hoot.trace("distanceScore: " + distanceScore);
hoot.trace("weightShapeDistanceScore: " + weightShapeDistanceScore);
hoot.trace("lengthScore: " + lengthScore);
- hoot.debug("geometryMatch: " + geometryMatch);
+ hoot.trace("geometryMatch: " + geometryMatch);
var featureMatch = typeScorePassesThreshold && geometryMatch;
if (featureMatch)
{
result = { match: 1.0 };
}
- hoot.debug("featureMatch: " + featureMatch);
+ hoot.trace("featureMatch: " + featureMatch);
return result;
};