- Timestamp:
- 2013-06-07T00:05:07+02:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicateNode.java
r5503 r5995 89 89 protected final static int DUPLICATE_NODE_MIXED = 2; 90 90 protected final static int DUPLICATE_NODE_OTHER = 3; 91 protected final static int DUPLICATE_NODE_UNCLOSED = 4;92 91 protected final static int DUPLICATE_NODE_BUILDING = 10; 93 92 protected final static int DUPLICATE_NODE_BOUNDARY = 11; … … 173 172 if (mm.get(tagSet).size() > 1) { 174 173 175 boolean oneWayClosed = false;176 177 174 for (String type: types) { 178 175 typeMap.put(type, false); … … 187 184 boolean typed = false; 188 185 Way w=(Way) sp; 189 oneWayClosed = oneWayClosed || w.isClosed();190 186 Map<String, String> keys = w.getKeys(); 191 187 for (String type: typeMap.keySet()) { … … 211 207 } 212 208 213 if (!oneWayClosed) { 214 String msg = marktr("Duplicate nodes in two un-closed ways"); 215 errors.add(new TestError( 216 parentTest, 217 Severity.WARNING, 218 tr("Duplicated nodes"), 219 tr(msg), 220 msg, 221 DUPLICATE_NODE_UNCLOSED, 222 mm.get(tagSet) 223 )); 224 } else if (nbType>1) { 209 if (nbType>1) { 225 210 String msg = marktr("Mixed type duplicated nodes"); 226 211 errors.add(new TestError( … … 429 414 // never merge nodes with different tags. 430 415 if (testError.getCode() == DUPLICATE_NODE) return false; 431 // never merge nodes from two different non-closed geometries432 if (testError.getCode() == DUPLICATE_NODE_UNCLOSED) return false;433 416 // everything else is ok to merge 434 417 return true;
Note:
See TracChangeset
for help on using the changeset viewer.