Changeset 7062 in josm for trunk/src


Ignore:
Timestamp:
2014-05-04T16:03:06+02:00 (6 years ago)
Author:
Don-vip
Message:

fix #9976 - false positive: missing power=tower/pole

File:
1 edited

Legend:

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

    r7005 r7062  
    4343    public static final Collection<String> POWER_STATION_TAGS = Arrays.asList("station", "sub_station", "substation", "plant", "generator");
    4444    /** Values for {@code power} key interpreted as allowed power items */
    45     public static final Collection<String> POWER_ALLOWED_TAGS = Arrays.asList("switch", "transformer", "busbar", "generator");
     45    public static final Collection<String> POWER_ALLOWED_TAGS = Arrays.asList("switch", "transformer", "busbar", "generator", "switchgear");
    4646
    4747    private final Map<Way, String> towerPoleTagMap = new HashMap<>();
     
    6868                    if (!isPowerTower(n)) {
    6969                        if (!isPowerAllowed(n)) {
    70                             potentialErrors.add(new PowerLineError(n, w));
    71                             erroneous = true;
     70                            if (!w.isFirstLastNode(n) || !isPowerStation(n)) {
     71                                potentialErrors.add(new PowerLineError(n, w));
     72                                erroneous = true;
     73                            }
    7274                        }
    7375                    } else if (fixValue == null) {
Note: See TracChangeset for help on using the changeset viewer.