mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-18 14:45:12 +02:00
Add explicit check for very close nodes with an identical location
This commit is contained in:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user