Skip to content

Commit

Permalink
output only route names not ids
Browse files Browse the repository at this point in the history
  • Loading branch information
abyrd committed Feb 2, 2024
1 parent 1d97d49 commit c69be72
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main/java/com/conveyal/r5/transit/TransitLayer.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit c69be72

Please sign in to comment.