Ticket #20663: 20663.patch
| File 20663.patch, 4.2 KB (added by , 5 years ago) |
|---|
-
nodist/data/multipolygon.osm
4190 4190 <relation id='-42115' action='modify'> 4191 4191 <member type='way' ref='-41755' role='inner' /> 4192 4192 <member type='way' ref='-41791' role='outer' /> 4193 <tag k='josm_error_codes' v='16 07' />4194 <tag k='name' v='06/03 - Mismatching way styles' />4193 <tag k='josm_error_codes' v='1613' /> 4194 <tag k='name' v='06/03 - Area style on outer way' /> 4195 4195 <tag k='natural' v='water' /> 4196 4196 <tag k='type' v='multipolygon' /> 4197 4197 </relation> -
src/org/openstreetmap/josm/data/validation/tests/MultipolygonTest.java
56 56 public static final int INNER_WAY_OUTSIDE = 1605; 57 57 /** Intersection between multipolygon ways */ 58 58 public static final int CROSSING_WAYS = 1606; 59 /** Style for outer way mismatches / With the currently used mappaint style(s) the style for outer way mismatches the area style */ 60 public static final int OUTER_STYLE_MISMATCH = 1607; 59 // 1607 is no longer used: With the currently used mappaint style(s) the style for outer way mismatches the area style 61 60 /** With the currently used mappaint style the style for inner way equals the multipolygon style */ 62 61 public static final int INNER_STYLE_MISMATCH = 1608; 63 // no longer used: Area style way is not closed NOT_CLOSED = 160962 // 1609 is no longer used: Area style way is not closed 64 63 /** No area style for multipolygon */ 65 64 public static final int NO_STYLE = 1610; 66 // no longer used: Multipolygon relation should be tagged with area tags and not the outer way(s) NO_STYLE_POLYGON = 1611;65 // 1611 is no longer used: Multipolygon relation should be tagged with area tags and not the outer way(s) 67 66 /** Area style on outer way */ 68 67 public static final int OUTER_STYLE = 1613; 69 68 /** Multipolygon member repeated (same primitive, same role */ … … 125 124 * Various style-related checks:<ul> 126 125 * <li>{@link #NO_STYLE}: No area style for multipolygon</li> 127 126 * <li>{@link #INNER_STYLE_MISMATCH}: With the currently used mappaint style the style for inner way equals the multipolygon style</li> 128 * <li>{@link #OUTER_STYLE_MISMATCH}: With the currently used mappaint style the style for outer way mismatches the area style</li>129 127 * <li>{@link #OUTER_STYLE}: Area style on outer way</li> 130 128 * </ul> 131 129 * @param r relation … … 154 152 continue; 155 153 AreaElement areaOuter = ElemStyles.getAreaElemStyle(wOuter, false); 156 154 if (areaOuter != null) { 157 if (!area.equals(areaOuter)) { 158 errors.add(TestError.builder(this, Severity.OTHER, OUTER_STYLE_MISMATCH) 159 .message(tr("With the currently used mappaint style the style for outer way mismatches the area style")) 160 .primitives(Arrays.asList(r, wOuter)) 161 .highlight(wOuter) 162 .build()); 163 } else { /* style on outer way of multipolygon, but equal to polygon */ 164 errors.add(TestError.builder(this, Severity.WARNING, OUTER_STYLE) 165 .message(tr("Area style on outer way")) 166 .primitives(Arrays.asList(r, wOuter)) 167 .highlight(wOuter) 168 .build()); 169 } 155 errors.add(TestError.builder(this, Severity.WARNING, OUTER_STYLE) 156 .message(tr("Area style on outer way")) 157 .primitives(Arrays.asList(r, wOuter)) 158 .highlight(wOuter) 159 .build()); 170 160 } 171 161 } 172 162 }
