Ticket #9819: 9819_combined_v1.patch
File 9819_combined_v1.patch, 4.4 KB (added by , 4 years ago) |
---|
-
resources/data/validator/combinations.mapcss
75 75 assertMatch: "node source:addr:postcode=postman"; 76 76 } 77 77 78 way!:closed[highway][layer][layer!=0][!bridge][!tunnel][!covered][highway!~/steps|elevator/], 79 way!:closed[railway][layer][layer!=0][!bridge][!tunnel][!covered], 80 way!:closed[waterway][layer][layer!=0][!bridge][!tunnel][!covered] { 81 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}=*"); 82 group: tr("suspicious tag combination"); 83 assertMatch: "way highway=tertiary layer=2"; 84 assertMatch: "way waterway=stream layer=-1"; 85 assertMatch: "way railway=rail layer=2"; 86 assertNoMatch: "way highway=tertiary layer=2 bridge=yes"; 87 assertNoMatch: "way waterway=stream layer=-1 tunnel=yes"; 88 assertNoMatch: "way railway=rail layer=2 bridge=yes"; 89 } 90 78 91 /* {0.key} without {1.key} (info level) */ 79 92 way[lanes:forward][!lanes:backward][oneway!=yes][oneway!=-1], 80 93 way[lanes:backward][!lanes:forward][oneway!=yes][oneway!=-1], … … 573 586 throwWarning: tr("{0} on a relation without {1}", "{0.key}", "{1.tag}"); 574 587 } 575 588 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 589 /* #13144, #15536 */ 587 590 *[unisex=yes][female=yes][male!=yes][shop=hairdresser], 588 591 *[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 389 } 388 390 } else { 389 391 highlight.add(es1); 390 392 highlight.add(es2);