- Timestamp:
- 2016-01-10T03:23:50+01:00 (9 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/data/validation
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/validation/Test.java
r9371 r9381 14 14 15 15 import org.openstreetmap.josm.Main; 16 import org.openstreetmap.josm.actions.search.SearchCompiler.InDataSourceArea; 16 17 import org.openstreetmap.josm.command.Command; 17 18 import org.openstreetmap.josm.command.DeleteCommand; … … 24 25 import org.openstreetmap.josm.gui.progress.ProgressMonitor; 25 26 import org.openstreetmap.josm.tools.GBC; 27 import org.openstreetmap.josm.tools.Predicate; 26 28 import org.openstreetmap.josm.tools.Utils; 27 29 … … 37 39 public class Test extends AbstractVisitor { 38 40 41 protected static final Predicate<OsmPrimitive> IN_DOWNLOADED_AREA = new InDataSourceArea(false); 42 39 43 /** Name of the test */ 40 44 protected final String name; -
trunk/src/org/openstreetmap/josm/data/validation/tests/Highways.java
r8941 r9381 154 154 public static boolean isHighwayLinkOkay(final Way way) { 155 155 final String highway = way.get("highway"); 156 if (highway == null || !highway.endsWith("_link")) { 156 if (highway == null || !highway.endsWith("_link") 157 || !IN_DOWNLOADED_AREA.evaluate(way.getNode(0)) || !IN_DOWNLOADED_AREA.evaluate(way.getNode(way.getNodesCount()-1))) { 157 158 return true; 158 159 } -
trunk/src/org/openstreetmap/josm/data/validation/tests/PowerLines.java
r9321 r9381 13 13 14 14 import org.openstreetmap.josm.Main; 15 import org.openstreetmap.josm.actions.search.SearchCompiler.InDataSourceArea;16 15 import org.openstreetmap.josm.command.ChangePropertyCommand; 17 16 import org.openstreetmap.josm.command.Command; … … 28 27 import org.openstreetmap.josm.gui.progress.ProgressMonitor; 29 28 import org.openstreetmap.josm.tools.Geometry; 30 import org.openstreetmap.josm.tools.Predicate;31 29 32 30 /** … … 46 44 /** Values for {@code power} key interpreted as allowed power items */ 47 45 protected static final Collection<String> POWER_ALLOWED_TAGS = Arrays.asList("switch", "transformer", "busbar", "generator", "switchgear"); 48 49 protected static final Predicate<OsmPrimitive> IN_DOWNLOADED_AREA = new InDataSourceArea(false);50 46 51 47 private final Map<Way, String> towerPoleTagMap = new HashMap<>();
Note:
See TracChangeset
for help on using the changeset viewer.