Changeset 9236 in josm for trunk/src


Ignore:
Timestamp:
2016-01-01T14:15:01+01:00 (9 years ago)
Author:
simon04
Message:

fix #12111 - Detect when "to" and "from" are the same in turn restrictions

File:
1 edited

Legend:

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

    r8452 r9236  
    3939    protected static final int UNCONNECTED_VIA = 1814;
    4040    protected static final int SUPERFLUOUS = 1815;
     41    protected static final int FROM_EQUALS_TO = 1816;
    4142
    4243    /**
     
    142143            errors.add(new TestError(this, Severity.ERROR, tr("No \"to\" way found"), NO_TO, r));
    143144            return;
     145        }
     146        if (fromWay.equals(toWay) && !r.hasTag("restriction", "no_u_turn")) {
     147            errors.add(new TestError(this, Severity.WARNING, tr("\"from\" way equals \"to\" way"), FROM_EQUALS_TO, r));
    144148        }
    145149        if (via.isEmpty()) {
Note: See TracChangeset for help on using the changeset viewer.