@@ -69,9 +69,10 @@ public class RealtimeFeed {
69
69
private final Map <Integer , byte []> additionalTripDescriptors ;
70
70
private final Map <Integer , Integer > stopSequences ;
71
71
private final Map <Integer , GtfsStorage .Validity > validities ;
72
+ private final Map <Integer , GtfsStorageI .PlatformDescriptor > platformDescriptorByEdge ;
72
73
73
74
private RealtimeFeed (GtfsStorage staticGtfs , Map <String , GtfsRealtime .FeedMessage > feedMessages , IntHashSet blockedEdges ,
74
- IntLongHashMap delaysForBoardEdges , IntLongHashMap delaysForAlightEdges , List <VirtualEdgeIteratorState > additionalEdges , Map <Integer , byte []> tripDescriptors , Map <Integer , Integer > stopSequences , Map <GtfsStorage .Validity , Integer > operatingDayPatterns , Map <GtfsStorage .FeedIdWithTimezone , Integer > writableTimeZones ) {
75
+ IntLongHashMap delaysForBoardEdges , IntLongHashMap delaysForAlightEdges , List <VirtualEdgeIteratorState > additionalEdges , Map <Integer , byte []> tripDescriptors , Map <Integer , Integer > stopSequences , Map <GtfsStorage .Validity , Integer > operatingDayPatterns , Map <GtfsStorage .FeedIdWithTimezone , Integer > writableTimeZones , Map < Integer , GtfsStorageI . PlatformDescriptor > platformDescriptorByEdge ) {
75
76
this .staticGtfs = staticGtfs ;
76
77
this .feedMessages = feedMessages ;
77
78
this .blockedEdges = blockedEdges ;
@@ -85,10 +86,11 @@ private RealtimeFeed(GtfsStorage staticGtfs, Map<String, GtfsRealtime.FeedMessag
85
86
reverseOperatingDayPatterns .put (entry .getValue (), entry .getKey ());
86
87
}
87
88
this .validities = Collections .unmodifiableMap (reverseOperatingDayPatterns );
89
+ this .platformDescriptorByEdge = platformDescriptorByEdge ;
88
90
}
89
91
90
92
public static RealtimeFeed empty (GtfsStorage staticGtfs ) {
91
- return new RealtimeFeed (staticGtfs , Collections .emptyMap (), new IntHashSet (), new IntLongHashMap (), new IntLongHashMap (), Collections .emptyList (), Collections .emptyMap (), Collections .emptyMap (), staticGtfs .getOperatingDayPatterns (), staticGtfs .getWritableTimeZones ());
93
+ return new RealtimeFeed (staticGtfs , Collections .emptyMap (), new IntHashSet (), new IntLongHashMap (), new IntLongHashMap (), Collections .emptyList (), Collections .emptyMap (), Collections .emptyMap (), staticGtfs .getOperatingDayPatterns (), staticGtfs .getWritableTimeZones (), staticGtfs . getPlatformDescriptorByEdge () );
92
94
}
93
95
94
96
public static RealtimeFeed fromProtobuf (GraphHopperStorage graphHopperStorage , GtfsStorage staticGtfs , Map <String , GtfsRealtime .FeedMessage > feedMessages ) {
@@ -266,7 +268,7 @@ public boolean isAdjacentToNode(int edge, int node) {
266
268
Map <String , int []> boardEdgesForTrip = new HashMap <>();
267
269
Map <String , int []> alightEdgesForTrip = new HashMap <>();
268
270
Map <GtfsStorage .FeedIdWithTimezone , Integer > writableTimeZones = new HashMap <>(staticGtfs .getWritableTimeZones ());
269
-
271
+ Map < Integer , GtfsStorageI . PlatformDescriptor > platformDescriptorByEdge = new HashMap <>( staticGtfs . getPlatformDescriptorByEdge ());
270
272
271
273
feedMessages .forEach ((feedKey , feedMessage ) -> {
272
274
GTFSFeed feed = staticGtfs .getGtfsFeeds ().get (feedKey );
@@ -331,7 +333,7 @@ public Map<GtfsStorage.FeedIdWithStopId, Integer> getStationNodes() {
331
333
332
334
@ Override
333
335
public Map <Integer , PlatformDescriptor > getPlatformDescriptorByEdge () {
334
- return staticGtfs . getPlatformDescriptorByEdge () ;
336
+ return platformDescriptorByEdge ;
335
337
}
336
338
};
337
339
final GtfsReader gtfsReader = new GtfsReader (feedKey , overlayGraph , graphHopperStorage .getEncodingManager (), gtfsStorage , null );
@@ -406,7 +408,7 @@ public Map<Integer, PlatformDescriptor> getPlatformDescriptorByEdge() {
406
408
gtfsReader .wireUpAdditionalDeparturesAndArrivals (timezone );
407
409
});
408
410
409
- return new RealtimeFeed (staticGtfs , feedMessages , blockedEdges , delaysForBoardEdges , delaysForAlightEdges , additionalEdges , tripDescriptors , stopSequences , operatingDayPatterns , writableTimeZones );
411
+ return new RealtimeFeed (staticGtfs , feedMessages , blockedEdges , delaysForBoardEdges , delaysForAlightEdges , additionalEdges , tripDescriptors , stopSequences , operatingDayPatterns , writableTimeZones , platformDescriptorByEdge );
410
412
}
411
413
412
414
boolean isBlocked (int edgeId ) {
@@ -597,4 +599,8 @@ public GtfsStorage.Validity getValidity(int validityId) {
597
599
return validities .get (validityId );
598
600
}
599
601
602
+ public Map <Integer , GtfsStorageI .PlatformDescriptor > getPlatformDescriptorByEdge () {
603
+ return platformDescriptorByEdge ;
604
+ }
605
+
600
606
}
0 commit comments