Add explicit check for very close nodes with an identical location

This commit is contained in:
Quincy Morgan
2019-05-10 12:14:29 -04:00
parent 7a6949aa2e
commit 36a564f453
+6 -2
View File
@@ -84,11 +84,15 @@ export function validationCloseNodes() {
function getIssueIfAny(node1, node2, way, context) {
if (node1.id === node2.id ||
(node1.hasInterestingTags() && node2.hasInterestingTags()) ||
geoSphericalDistance(node1.loc, node2.loc) >= thresholdMeters) {
(node1.hasInterestingTags() && node2.hasInterestingTags())) {
return null;
}
var nodesAreVeryClose = node1.loc === node2.loc ||
geoSphericalDistance(node1.loc, node2.loc) < thresholdMeters;
if (!nodesAreVeryClose) return null;
return new validationIssue({
type: type,
severity: 'warning',