Changeset 18223 in osm for applications/editors/josm/plugins
- Timestamp:
- 2009-10-20T21:02:10+02:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/tests/UnconnectedWays.java
r17722 r18223 51 51 public void startTest(ProgressMonitor monitor) 52 52 { 53 53 super.startTest(monitor); 54 54 ways = new HashSet<MyWaySegment>(); 55 55 endnodes = new HashSet<Node>(); … … 162 162 private Line2D line; 163 163 public Way w; 164 public Boolean isAbandoned = false;165 public Boolean isBoundary = false;166 public Boolean highway;164 public boolean isAbandoned = false; 165 public boolean isBoundary = false; 166 public boolean highway; 167 167 168 168 public MyWaySegment(Way w, Node n1, Node n2) … … 170 170 this.w = w; 171 171 String railway = w.get("railway"); 172 this.isAbandoned = railway != null && railway.equals("abandoned"); 173 this.highway = w.get("highway") != null || (railway != null && !isAbandoned); 174 this.isBoundary = w.get("boundary") != null && w.get("boundary").equals("administrative") && !this.highway; 172 String highway = w.get("highway"); 173 this.isAbandoned = "abandoned".equals(railway) || "yes".equals(w.get("disused")); 174 this.highway = (highway != null || railway != null) && !isAbandoned; 175 this.isBoundary = !this.highway && "administrative".equals(w.get("boundary")); 175 176 line = new Line2D.Double(n1.getEastNorth().east(), n1.getEastNorth().north(), 176 177 n2.getEastNorth().east(), n2.getEastNorth().north()); … … 193 194 public void visit(Way w) 194 195 { 195 if( !w.isUsable() ) 196 if (!w.isUsable() 197 || w.get("barrier") != null 198 || "cliff".equals(w.get("natural"))) 196 199 return; 200 197 201 int size = w.getNodesCount(); 198 202 if(size < 2)
Note:
See TracChangeset
for help on using the changeset viewer.