Update stub ends test to check 5m by default and ignore noexit=yes

Signed-off-by: Taylor Smock <taylor.smock@kaart.com>
pull/1/head v1.3.0
Taylor Smock 2020-02-06 07:37:25 -07:00
rodzic dadda286d5
commit 571c2dd7f2
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 625F6A74A3E4311A
1 zmienionych plików z 4 dodań i 1 usunięć

Wyświetl plik

@ -25,7 +25,7 @@ import org.openstreetmap.josm.spi.preferences.Config;
public class StubEndsTest extends Test {
private static final String HIGHWAY = "highway";
private static final List<String> BAD_HIGHWAYS = Arrays.asList("services", "rest_area");
private double max_length = Config.getPref().getDouble(MapWithAIPlugin.NAME + ".stubendlength", 10);
private double max_length = Config.getPref().getDouble(MapWithAIPlugin.NAME + ".stubendlength", 5);
public StubEndsTest() {
super(tr("Stub Ends ({0})", MapWithAIPlugin.NAME), tr("Look for short ends on ways"));
@ -101,6 +101,9 @@ public class StubEndsTest extends Test {
private static double distanceToConnection(Way way, List<Node> nodesToConnection, List<Node> nodeOrder) {
double distance = 0;
Node previous = nodeOrder.get(0);
if (previous.hasTag("noexit")) {
return Double.NaN;
}
// isOutsideDownloadArea returns false if new or undeleted as well
if (!previous.isOutsideDownloadArea()) {
for (Node node : nodeOrder) {