Ignore:
Timestamp:
2017-02-25T03:14:20+01:00 (7 years ago)
Author:
Don-vip
Message:

fix #14402 - add blacklist for leisure area values to avoid false positives - improve globally the detection of keys/tags

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/validation/tests/Highways.java

    r11129 r11608  
    9292    public void visit(Way w) {
    9393        if (w.isUsable()) {
    94             if (w.isClosed() && w.hasKey("highway") && CLASSIFIED_HIGHWAYS.contains(w.get("highway"))
    95                     && w.hasKey("junction") && "roundabout".equals(w.get("junction"))) {
     94            if (w.isClosed() && w.hasTag("highway", CLASSIFIED_HIGHWAYS) && w.hasTag("junction", "roundabout")) {
    9695                // TODO: find out how to handle splitted roundabouts (see #12841)
    9796                testWrongRoundabout(w);
     
    131130                if (list.size() > 2 || oneway1 == null || oneway2 == null || !oneway1 || !oneway2) {
    132131                    // Error when the highway tags do not match
    133                     if (!w.get("highway").equals(s)) {
     132                    String value = w.get("highway");
     133                    if (!value.equals(s)) {
    134134                        errors.add(TestError.builder(this, Severity.WARNING, WRONG_ROUNDABOUT_HIGHWAY)
    135                                 .message(tr("Incorrect roundabout (highway: {0} instead of {1})", w.get("highway"), s))
     135                                .message(tr("Incorrect roundabout (highway: {0} instead of {1})", value, s))
    136136                                .primitives(w)
    137137                                .fix(() -> new ChangePropertyCommand(w, "highway", s))
Note: See TracChangeset for help on using the changeset viewer.