Changeset 7569 in josm
- Timestamp:
- 2014-09-20T20:54:48+02:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/validation/tests/MultipolygonTest.java
r7565 r7569 54 54 protected static final int NO_STYLE = 1610; 55 55 protected static final int NO_STYLE_POLYGON = 1611; 56 protected static final int STYLE_ON_WAY = 1612; 57 protected static final int OUTER_STYLE = 1613; 56 58 57 59 private static ElemStyles styles; … … 241 243 for (Way wOuter : polygon.getOuterWays()) { 242 244 AreaElemStyle areaOuter = ElemStyles.getAreaElemStyle(wOuter, false); 243 if (areaOuter != null && !area.equals(areaOuter)) {245 if (areaOuter != null) { 244 246 List<OsmPrimitive> l = new ArrayList<>(); 245 247 l.add(r); 246 248 l.add(wOuter); 247 addError(r, new TestError(this, Severity.WARNING, !areaStyle ? tr("Style for outer way mismatches") 248 : tr("Style for outer way mismatches polygon"), 249 OUTER_STYLE_MISMATCH, l, Collections.singletonList(wOuter))); 250 } 249 if (!area.equals(areaOuter)) { 250 addError(r, new TestError(this, Severity.WARNING, !areaStyle ? tr("Style for outer way mismatches") 251 : tr("Style for outer way mismatches polygon"), 252 OUTER_STYLE_MISMATCH, l, Collections.singletonList(wOuter))); 253 } else if (areaStyle) { /* style on outer way of multipolygon, but equal to polygon */ 254 addError(r, new TestError(this, Severity.WARNING, tr("Style on outer way"), OUTER_STYLE, 255 l, Collections.singletonList(wOuter))); 256 } 257 } 258 } 259 if(!areaStyle) { /* old style multipolygon - solve: copy tags from outer way to multipolygon */ 260 addError(r, new TestError(this, Severity.WARNING, tr("Style is on way and not on multipolygon"), STYLE_ON_WAY, r)); 251 261 } 252 262 }
Note:
See TracChangeset
for help on using the changeset viewer.