diff --git a/core/src/main/java/org/eqasim/core/scenario/preparation/FacilityPlacement.java b/core/src/main/java/org/eqasim/core/scenario/preparation/FacilityPlacement.java index 2880e41e6..949a47a78 100644 --- a/core/src/main/java/org/eqasim/core/scenario/preparation/FacilityPlacement.java +++ b/core/src/main/java/org/eqasim/core/scenario/preparation/FacilityPlacement.java @@ -87,11 +87,13 @@ static public interface FacilityPlacementVoter { } static public class OSMFacilityPlacementVoter implements FacilityPlacementVoter { + private final static String HIGHWAY_TAG = "osm:way:highway"; + public OSMFacilityPlacementVoter(RoadNetwork network) { boolean foundAttribute = false; for (Link link : network.getLinks().values()) { - if (link.getAttributes().getAttribute("osm:highway") != null) { + if (link.getAttributes().getAttribute(HIGHWAY_TAG) != null) { foundAttribute = true; break; } @@ -104,7 +106,7 @@ public OSMFacilityPlacementVoter(RoadNetwork network) { @Override public boolean canPlaceFacility(Link link) { - String highway = (String) link.getAttributes().getAttribute("osm:highway"); + String highway = (String) link.getAttributes().getAttribute(HIGHWAY_TAG); if (highway != null) { if (highway.contains("motorway")) { @@ -114,6 +116,10 @@ public boolean canPlaceFacility(Link link) { if (highway.contains("trunk")) { return false; } + + if (highway.contains("_link")) { + return false; + } } return true;