Ticket #9819: 9819_final_v1.patch
| File 9819_final_v1.patch, 4.5 KB (added by , 5 years ago) |
|---|
-
resources/data/validator/combinations.mapcss
75 75 assertMatch: "node source:addr:postcode=postman"; 76 76 } 77 77 78 /* #9819 stricter checking for highways crossing waterways without bridges */ 79 way!:closed[highway][layer][layer!=0][!bridge][!tunnel][!covered][highway!~/steps|elevator/], 80 way!:closed[railway][layer][layer!=0][!bridge][!tunnel][!covered], 81 way!:closed[waterway][layer][layer!=0][!bridge][!tunnel][!covered] { 82 throwWarning: tr("inspect to confirm a {1} tag is necessary on this {0}. If so, add either {2}, {3}, {4} or any other tags complimentary to {5}", "{2.key}", "{3.key}", "{4.key}=*", "{5.key}=*", "{6.key}=*", "{3.key}=*"); 83 group: tr("suspicious tag combination"); 84 assertMatch: "way highway=tertiary layer=2"; 85 assertMatch: "way waterway=stream layer=-1"; 86 assertMatch: "way railway=rail layer=2"; 87 assertNoMatch: "way highway=tertiary layer=2 bridge=yes"; 88 assertNoMatch: "way waterway=stream layer=-1 tunnel=yes"; 89 assertNoMatch: "way railway=rail layer=2 bridge=yes"; 90 } 91 78 92 /* {0.key} without {1.key} (info level) */ 79 93 way[lanes:forward][!lanes:backward][oneway!=yes][oneway!=-1], 80 94 way[lanes:backward][!lanes:forward][oneway!=yes][oneway!=-1], … … 573 587 throwWarning: tr("{0} on a relation without {1}", "{0.key}", "{1.tag}"); 574 588 } 575 589 576 /* #9182 */577 way[waterway][layer][layer=~/^(-1|-2|-3|-4|-5)$/][!tunnel][culvert!=yes][covered!=yes][pipeline!=yes][location!=underground][eval(waylength()) > 400] {578 throwWarning: tr("Long waterway with {0} but without a tag which defines it as tunnel or underground. Remove {1} or add a tunnel tag if applicable. Also check crossing bridges and their {1} tags.", "{1.tag}", "{1.key}");579 group: tr("suspicious tag combination");580 }581 way[waterway][layer][layer=~/^(-1|-2|-3|-4|-5)$/][!tunnel][culvert!=yes][covered!=yes][pipeline!=yes][location!=underground][eval(waylength()) <= 400] {582 throwOther: tr("Short waterway with {0} but without a tag which defines it as tunnel or underground. Remove {1} or add a tunnel tag if applicable. Also check crossing bridges and their {1} tags.", "{1.tag}", "{1.key}");583 group: tr("suspicious tag combination");584 }585 586 590 /* #13144, #15536 */ 587 591 *[unisex=yes][female=yes][male!=yes][shop=hairdresser], 588 592 *[unisex=yes][male=yes][female!=yes][shop=hairdresser] { -
src/org/openstreetmap/josm/data/validation/tests/CrossingWays.java
114 114 boolean ignoreWaySegmentCombination(Way w1, Way w2) { 115 115 if (w1 == w2) 116 116 return true; 117 if (areLayerOrLevelDifferent(w1, w2))118 return true;119 117 if (isBuilding(w1) && isBuilding(w2)) 120 118 return true; // handled by mapcss tests 121 119 if (((isResidentialArea(w1) || w1.hasKey(BARRIER, HIGHWAY, RAILWAY, WATERWAY) || isWaterArea(w1)) … … 378 376 highlight.add(es1); 379 377 highlight.add(es2); 380 378 381 final MessageHelper message = createMessage(es1.getWay(), es2.getWay()); 382 errors.add(TestError.builder(this, Severity.WARNING, message.code) 383 .message(message.message) 384 .primitives(prims) 385 .highlightWaySegments(highlight) 386 .build()); 387 seenWays.put(prims, highlight); 379 if (!areLayerOrLevelDifferent(es1.getWay(), es2.getWay())) 380 { 381 final MessageHelper message = createMessage(es1.getWay(), es2.getWay()); 382 errors.add(TestError.builder(this, Severity.WARNING, message.code) 383 .message(message.message) 384 .primitives(prims) 385 .highlightWaySegments(highlight) 386 .build()); 387 seenWays.put(prims, highlight); 388 } 388 389 } else { 389 390 highlight.add(es1); 390 391 highlight.add(es2);
