kopia lustrzana https://github.com/JOSM/MapWithAI
Ignore highways with non-routing tags
Signed-off-by: Taylor Smock <taylor.smock@kaart.com>pull/1/head v1.1.1
rodzic
49f6ff7527
commit
39b66da4e2
|
@ -50,6 +50,7 @@ public class RoutingIslandsTest extends Test {
|
|||
|
||||
private static final String HIGHWAY = "highway";
|
||||
private static final String WATERWAY = "waterway";
|
||||
private static final List<String> IGNORE_TAGS = Arrays.asList("services", "rest_area");
|
||||
|
||||
/**
|
||||
* This is mostly as a sanity check, and to avoid infinite recursion (shouldn't
|
||||
|
@ -91,8 +92,9 @@ public class RoutingIslandsTest extends Test {
|
|||
|
||||
@Override
|
||||
public void visit(Way way) {
|
||||
if (way.isUsable() && way.getNodes().parallelStream().anyMatch(node -> way.getDataSet().getDataSourceBounds()
|
||||
.parallelStream().anyMatch(source -> source.contains(node.getCoor())))) {
|
||||
if (way.isUsable() && !IGNORE_TAGS.contains(way.get("highway")) && !IGNORE_TAGS.contains(way.get("waterway"))
|
||||
&& way.getNodes().parallelStream().anyMatch(node -> way.getDataSet().getDataSourceBounds()
|
||||
.parallelStream().anyMatch(source -> source.contains(node.getCoor())))) {
|
||||
if ((way.hasKey(HIGHWAY) || way.hasKey(WATERWAY))
|
||||
&& way.getNodes().parallelStream().flatMap(node -> node.getReferrers().parallelStream()).distinct()
|
||||
.allMatch(way::equals)
|
||||
|
|
Ładowanie…
Reference in New Issue