- Timestamp:
- 2011-10-01T14:23:58+02:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/validation/tests/CrossingWays.java
r4048 r4481 74 74 boolean isTram1 = "tram".equals(railway1); 75 75 boolean isBuilding = (w.get("building") != null); 76 String waterway1 = w.get("waterway"); 76 77 77 78 if (w.get("highway") == null && w.get("waterway") == null … … 86 87 for (int i = 0; i < nodesSize - 1; i++) { 87 88 WaySegment ws = new WaySegment(w, i); 88 ExtendedSegment es1 = new ExtendedSegment(ws, layer1, railway1, isCoastline1 );89 ExtendedSegment es1 = new ExtendedSegment(ws, layer1, railway1, isCoastline1, waterway1); 89 90 List<List<ExtendedSegment>> cellSegments = getSegments(es1.n1, es1.n2); 90 91 for (List<ExtendedSegment> segments : cellSegments) { … … 107 108 108 109 if (isCoastline1 != isCoastline2) continue; 110 if (("river".equals(waterway1) && "riverbank".equals(es2.waterway)) 111 || ("riverbank".equals(waterway1) && "river".equals(es2.waterway))) continue; 109 112 110 113 if ((es1.railway != null && es1.railway.equals("abandoned")) … … 170 173 public String railway; 171 174 175 /** The waterway type */ 176 public String waterway; 177 172 178 /** The coastline type */ 173 179 public boolean coastline; … … 179 185 * @param railway The railway type of the way this segment is in 180 186 * @param coastline The coastline flag of the way the segment is in 187 * @param waterway The waterway type of the way this segment is in 181 188 */ 182 public ExtendedSegment(WaySegment ws, String layer, String railway, boolean coastline ) {189 public ExtendedSegment(WaySegment ws, String layer, String railway, boolean coastline, String waterway) { 183 190 this.ws = ws; 184 191 this.n1 = ws.way.getNodes().get(ws.lowerIndex); … … 187 194 this.railway = railway; 188 195 this.coastline = coastline; 196 this.waterway = waterway; 189 197 } 190 198
Note:
See TracChangeset
for help on using the changeset viewer.