- Timestamp:
- 2013-10-06T18:10:24+02:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/validation/tests/OverlappingWays.java
r6300 r6301 14 14 import org.openstreetmap.josm.data.osm.OsmPrimitive; 15 15 import org.openstreetmap.josm.data.osm.OsmUtils; 16 import org.openstreetmap.josm.data.osm.Relation; 16 17 import org.openstreetmap.josm.data.osm.Way; 17 18 import org.openstreetmap.josm.data.osm.WaySegment; … … 54 55 } 55 56 57 private boolean concernsArea(OsmPrimitive p) { 58 return p.get("landuse") != null 59 || "riverbank".equals(p.get("waterway")) 60 || p.get("natural") != null 61 || p.get("amenity") != null 62 || p.get("leisure") != null 63 || p.get("building") != null; 64 } 65 66 private boolean parentMultipolygonConcernsArea(OsmPrimitive p) { 67 for (Relation r : OsmPrimitive.getFilteredList(p.getReferrers(), Relation.class)) { 68 if (r.isMultipolygon() && concernsArea(r) ) { 69 return true; 70 } 71 } 72 return false; 73 } 74 56 75 @Override 57 76 public void endTest() { … … 79 98 area++; 80 99 } 81 if (ws.way.get("landuse") != null 82 || "riverbank".equals(ws.way.get("waterway")) 83 || ws.way.get("natural") != null 84 || ws.way.get("amenity") != null 85 || ws.way.get("leisure") != null 86 || ws.way.get("building") != null) { 100 if (concernsArea(ws.way) || parentMultipolygonConcernsArea(ws.way)) { 87 101 area++; 88 102 ways--;
Note:
See TracChangeset
for help on using the changeset viewer.