From 675f45f951121ab346fd5705d6c6b6b324ac60f3 Mon Sep 17 00:00:00 2001 From: sime94 Date: Wed, 4 Sep 2024 12:28:44 +0200 Subject: [PATCH] OSM roadtype mapping can handle "highway" prefix now --- src/main/java/org/matsim/run/prepare/PrepareNetwork.java | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/main/java/org/matsim/run/prepare/PrepareNetwork.java b/src/main/java/org/matsim/run/prepare/PrepareNetwork.java index 9b292c5..bb5f89f 100644 --- a/src/main/java/org/matsim/run/prepare/PrepareNetwork.java +++ b/src/main/java/org/matsim/run/prepare/PrepareNetwork.java @@ -82,14 +82,6 @@ public static void prepareFreightNetwork(Network network) { public static void prepareEmissionsAttributes(Network network) { // do not use VspHbefaRoadTypeMapping() as it results in almost every road to mapped to "highway"! HbefaRoadTypeMapping roadTypeMapping = OsmHbefaMapping.build(); -// the type attribute in our network has the prefix "highway" for all links but pt links. -// we need to delete that because OsmHbefaMapping does not handle that. - for (Link link : network.getLinks().values()) { - //pt links can be disregarded - if (!link.getAllowedModes().contains("pt")) { - NetworkUtils.setType(link, NetworkUtils.getType(link).replaceFirst("highway.", "")); - } - } roadTypeMapping.addHbefaMappings(network); } }