Changeset 23792 in osm for applications/editors/josm/plugins/validator/src
- Timestamp:
- 2010-10-24T01:55:47+02:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/tests/UnconnectedWays.java
r20828 r23792 99 99 if (en == null) 100 100 continue; 101 //if("turning_circle".equals(en.get("highway")) ||102 // (isexit != null && isexit) || en.get("barrier") != null)103 // c4++;104 101 if(!s.highway) 105 102 continue; 106 103 if (!endnodes_highway.contains(en)) 107 104 continue; 108 Boolean isexit = OsmUtils.getOsmBoolean(en.get("noexit"));109 if("turning_circle".equals(en.get("highway"))||110 "bus_stop".equals(en.get("highway")) ||111 (isexit != null && isexit)|| en.get("barrier")!= null)105 if("turning_circle".equals(en.get("highway")) 106 || "bus_stop".equals(en.get("highway")) 107 || OsmUtils.isTrue(en.get("noexit")) 108 || en.hasKey("barrier")) 112 109 continue; 113 110 // There's a small false-positive here. Imagine an intersection … … 213 210 String railway = w.get("railway"); 214 211 String highway = w.get("highway"); 215 this.isAbandoned = "abandoned".equals(railway) || "yes".equals(w.get("disused"));212 this.isAbandoned = "abandoned".equals(railway) || OsmUtils.isTrue(w.get("disused")); 216 213 this.highway = (highway != null || railway != null) && !isAbandoned; 217 214 this.isBoundary = !this.highway && "administrative".equals(w.get("boundary")); … … 326 323 327 324 public boolean isArea() { 328 return w.get("landuse") != null 329 || w.get("leisure") != null 330 || w.get("building") != null; 325 return w.hasKey("landuse") 326 || w.hasKey("leisure") 327 || w.hasKey("amenity") 328 || w.hasKey("building"); 331 329 } 332 330 } … … 336 334 List<MyWaySegment> ret = new ArrayList<MyWaySegment>(); 337 335 if (!w.isUsable() 338 || w. get("barrier")!= null336 || w.hasKey("barrier") 339 337 || "cliff".equals(w.get("natural"))) 340 338 return ret; … … 360 358 ways.addAll(getWaySegments(w)); 361 359 Set<Node> set = endnodes; 362 if(w. get("highway")!= null || w.get("railway")!= null)360 if(w.hasKey("highway") || w.hasKey("railway")) 363 361 set = endnodes_highway; 364 362 addNode(w.firstNode(), set);
Note:
See TracChangeset
for help on using the changeset viewer.