Changeset 5503 in josm
- Timestamp:
- 2012-09-07T22:56:01+02:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicateNode.java
r5356 r5503 9 9 import java.util.Collections; 10 10 import java.util.HashMap; 11 import java.util.HashSet; 11 12 import java.util.Iterator; 12 13 import java.util.LinkedHashSet; … … 126 127 for (Object v: potentialDuplicates) { 127 128 if (v instanceof Node) { 128 // just one node at this position. Nothing to report as 129 // error 129 // just one node at this position. Nothing to report as error 130 130 continue; 131 131 } 132 132 133 // multiple nodes at the same position -> report errors 134 // 133 // multiple nodes at the same position -> check if all nodes have a distinct elevation 135 134 List<Node> nodes = (List<Node>) v; 135 Set<String> eles = new HashSet<String>(); 136 for (Node n : nodes) { 137 String ele = n.get("ele"); 138 if (ele != null) { 139 eles.add(ele); 140 } 141 } 142 if (eles.size() == nodes.size()) { 143 // All nodes at this position have a distinct elevation. 144 // This is normal in some particular cases (for example, geodesic points in France) 145 // Do not report this as an error 146 continue; 147 } 148 149 // report errors 136 150 errors.addAll(buildTestErrors(this, nodes)); 137 151 }
Note:
See TracChangeset
for help on using the changeset viewer.