Changeset 9321 in josm for trunk


Ignore:
Timestamp:
2016-01-05T15:43:10+01:00 (9 years ago)
Author:
Don-vip
Message:

fix #12234 - disable power validation test for nodes outside of downloaded area

File:
1 edited

Legend:

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

    r8882 r9321  
    1313
    1414import org.openstreetmap.josm.Main;
     15import org.openstreetmap.josm.actions.search.SearchCompiler.InDataSourceArea;
    1516import org.openstreetmap.josm.command.ChangePropertyCommand;
    1617import org.openstreetmap.josm.command.Command;
     
    2728import org.openstreetmap.josm.gui.progress.ProgressMonitor;
    2829import org.openstreetmap.josm.tools.Geometry;
     30import org.openstreetmap.josm.tools.Predicate;
    2931
    3032/**
     
    4547    protected static final Collection<String> POWER_ALLOWED_TAGS = Arrays.asList("switch", "transformer", "busbar", "generator", "switchgear");
    4648
     49    protected static final Predicate<OsmPrimitive> IN_DOWNLOADED_AREA = new InDataSourceArea(false);
     50
    4751    private final Map<Way, String> towerPoleTagMap = new HashMap<>();
    4852
     
    6771                for (Node n : w.getNodes()) {
    6872                    if (!isPowerTower(n)) {
    69                         if (!isPowerAllowed(n)) {
     73                        if (!isPowerAllowed(n) && IN_DOWNLOADED_AREA.evaluate(n)) {
    7074                            if (!w.isFirstLastNode(n) || !isPowerStation(n)) {
    7175                                potentialErrors.add(new PowerLineError(n, w));
Note: See TracChangeset for help on using the changeset viewer.