From c69be7265e2379a9ef90aca0051dd208c7e71864 Mon Sep 17 00:00:00 2001 From: Andrew Byrd Date: Fri, 2 Feb 2024 17:07:37 +0800 Subject: [PATCH] output only route names not ids --- src/main/java/com/conveyal/r5/transit/TransitLayer.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/conveyal/r5/transit/TransitLayer.java b/src/main/java/com/conveyal/r5/transit/TransitLayer.java index 5a6aa490e..d893f6925 100644 --- a/src/main/java/com/conveyal/r5/transit/TransitLayer.java +++ b/src/main/java/com/conveyal/r5/transit/TransitLayer.java @@ -888,14 +888,14 @@ public TIntSet findStopsInGeometry (Geometry geometry) { * For the given pattern index, returns the GTFS routeId. If includeName is true, the returned string will * also include a route_short_name or route_long_name (if they are not null). */ - public String routeString(int routeIndex, boolean includeName) { + public String routeString(int routeIndex, boolean nameNotId) { RouteInfo routeInfo = routes.get(routeIndex); String route = routeInfo.route_id; - if (includeName) { + if (nameNotId) { if (routeInfo.route_short_name != null) { - route += " (" + routeInfo.route_short_name + ")"; + route = routeInfo.route_short_name; } else if (routeInfo.route_long_name != null){ - route += " (" + routeInfo.route_long_name + ")"; + route = routeInfo.route_long_name; } } return route;