Changeset 7644 in josm for trunk/src


Ignore:
Timestamp:
2014-10-22T12:25:23+02:00 (10 years ago)
Author:
Don-vip
Message:

fix #10655 - WayConnectedToArea should not warn on leisure=slipway

File:
1 edited

Legend:

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

    r6792 r7644  
    7171            return;
    7272        } else if (isArea(p)) {
    73             addError(w, wayNode, p);
     73            addPossibleError(w, wayNode, p, p);
    7474        } else {
    7575            for (OsmPrimitive r : p.getReferrers()) {
     
    7777                        && r.hasTag("type", "multipolygon")
    7878                        && isArea(r)) {
    79                     addError(w, wayNode, p);
     79                    addPossibleError(w, wayNode, p, r);
    8080                    break;
    8181                }
     
    8989    }
    9090
    91     private void addError(Way w, Node wayNode, OsmPrimitive p) {
     91    private void addPossibleError(Way w, Node wayNode, OsmPrimitive p, OsmPrimitive area) {
     92        // Avoid "legal" cases (see #10655)
     93        if (w.hasKey("highway") && wayNode.hasTag("leisure", "slipway") && area.hasTag("natural", "water")) {
     94            return;
     95        }
    9296        errors.add(new TestError(this, Severity.WARNING,
    9397                tr("Way terminates on Area"), 2301,
Note: See TracChangeset for help on using the changeset viewer.