Skip to content

Commit

Permalink
refactor(Addressed PR feedback): Added an additional transfer minus o…
Browse files Browse the repository at this point in the history
…ptional fields
  • Loading branch information
br648 committed Oct 27, 2023
1 parent 5f9a727 commit e5355d3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
8 changes: 2 additions & 6 deletions src/main/java/com/conveyal/gtfs/model/Transfer.java
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,7 @@ public void loadOneRow() throws IOException {
getRefField("to_trip_id", false, feed.trips);

tr.feed = feed;
feed.transfers.put(
createId(tr.from_stop_id, tr.to_stop_id, tr.from_trip_id, tr.to_trip_id, tr.from_route_id, tr.to_route_id),
tr
);
feed.transfers.put(tr.getId(), tr);
}

}
Expand Down Expand Up @@ -133,5 +130,4 @@ private static String createId(
) {
return String.format("%s_%s_%s_%s_%s_%s", fromStopId, toStopId, fromTripId, toTripId, fromRouteId, toRouteId);
}

}
}
3 changes: 2 additions & 1 deletion src/test/resources/fake-agency/transfers.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
from_stop_id,to_stop_id,from_trip_id,to_trip_id,from_route_id,to_route_id,transfer_type,min_transfer_time
4u6g,johv,a30277f8-e50a-4a85-9141-b1e0da9d429d,frequency-trip,1,1,1,60
4u6g,johv,a30277f8-e50a-4a85-9141-b1e0da9d429d,frequency-trip,1,1,1,60
4u6g,123,,,,,1,60

0 comments on commit e5355d3

Please sign in to comment.