- Timestamp:
- 2012-02-16T08:37:57+01:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/validation/tests/WayConnectedToArea.java
r4806 r4950 4 4 5 5 import java.util.Arrays; 6 import java.util.List; 6 7 import org.openstreetmap.josm.data.osm.Node; 7 8 import org.openstreetmap.josm.data.osm.OsmPrimitive; … … 25 26 } 26 27 27 for (OsmPrimitive p : w.firstNode().getReferrers()) { 28 testForError(w, w.firstNode(), p); 28 boolean hasway = false; 29 List<OsmPrimitive> r = w.firstNode().getReferrers(); 30 for (OsmPrimitive p : r) { 31 if(p != w && p.hasKey("highway")) { 32 hasway = true; 33 break; 34 } 29 35 } 30 for (OsmPrimitive p : w.lastNode().getReferrers()) { 31 testForError(w, w.lastNode(), p); 36 if(!hasway) 37 { 38 for (OsmPrimitive p : r) { 39 testForError(w, w.firstNode(), p); 40 } 32 41 } 33 42 hasway = false; 43 r = w.lastNode().getReferrers(); 44 for (OsmPrimitive p : r) { 45 if(p != w && p.hasKey("highway")) { 46 hasway = true; 47 break; 48 } 49 } 50 if(!hasway) { 51 for (OsmPrimitive p : r) { 52 testForError(w, w.lastNode(), p); 53 } 54 } 34 55 } 35 56
Note:
See TracChangeset
for help on using the changeset viewer.