|
21 | 21 | import static com.conveyal.r5.analyst.cluster.TransportNetworkConfig.TransferConfig.STOP_TO_PATTERN; |
22 | 22 | import static com.google.common.base.Strings.isNullOrEmpty; |
23 | 23 |
|
24 | | -/** |
25 | | - * Transfers between transit stops can come from two sources: transfers.txt in GTFS inputs and |
26 | | - * routing through the OSM-derived street network. This class handles loading from transfers.txt and |
27 | | - * retains enough information so the subsequent street routing approach can adopt the behavior |
28 | | - * specified with TransportNetworkConfig.TransferConfig. The way in which GTFS transfers take |
29 | | - * priority over transfers found through the street network can be configured. |
30 | | - * <p> |
31 | | - * There can be multiple GTFS feeds and they are loaded in a streaming fashion, with only one open |
32 | | - * and consuming memory at a time. Therefore we lose a lot of context by the time the street routing |
33 | | - * happens. |
34 | | - * <p> |
35 | | - * Use a single instance across all GTFS feeds. Call the load method once on each feed in turn. This |
36 | | - * accumulates information from all feeds that will later be important for finding transfers through |
37 | | - * the OSM street network. |
38 | | - * <p> |
39 | | - * The GTFS transfers we load are specified in terms of minimum time, while the street transfers are |
40 | | - * stored as distances and resolved to time during searches based on the specified walk speed. On |
41 | | - * the downside this requires two separate data structures, but on the upside it simplifies loading |
42 | | - * because GTFS must be loaded one feed at a time, while on-street transfers must be found later |
43 | | - * after all GTFS feeds are loaded and all stops linked (because street transfers are expected to |
44 | | - * connect stops from different feeds). |
45 | | - * <p> |
46 | | - * TODO Further increase transfer time accuracy using GTFS pathways.txt |
47 | | - */ |
| 24 | +/// Transfers between transit stops can come from two sources: transfers.txt in GTFS inputs and |
| 25 | +/// routing through the OSM-derived street network. This class handles loading from transfers.txt |
| 26 | +/// and retains enough information so the subsequent street routing approach can adopt the behavior |
| 27 | +/// specified with TransportNetworkConfig.TransferConfig. The way in which GTFS transfers take |
| 28 | +/// priority over transfers found through the street network can be configured. |
| 29 | +/// |
| 30 | +/// There can be multiple GTFS feeds and they are loaded in a streaming fashion, with only one open |
| 31 | +/// and consuming memory at a time. Therefore we lose a lot of context by the time the street routing |
| 32 | +/// happens. |
| 33 | +/// |
| 34 | +/// Use a single instance across all GTFS feeds. Call the load method once on each feed in turn. This |
| 35 | +/// accumulates information from all feeds that will later be important for finding transfers through |
| 36 | +/// the OSM street network. |
| 37 | +/// |
| 38 | +/// The GTFS transfers we load are specified in terms of minimum time, while the street transfers are |
| 39 | +/// stored as distances and resolved to time during searches based on the specified walk speed. On |
| 40 | +/// the downside this requires two separate data structures, but on the upside it simplifies loading |
| 41 | +/// because GTFS must be loaded one feed at a time, while on-street transfers must be found later |
| 42 | +/// after all GTFS feeds are loaded and all stops linked (because street transfers are expected to |
| 43 | +/// connect stops from different feeds). |
| 44 | +/// |
| 45 | +/// TODO Further increase transfer time accuracy using GTFS pathways.txt |
48 | 46 | public class GtfsTransferLoader { |
49 | 47 |
|
50 | 48 | private static final Logger LOG = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); |
@@ -78,7 +76,7 @@ public record StopPair(int fromStop, int toStop) { } |
78 | 76 |
|
79 | 77 | public GtfsTransferLoader (TransitLayer transit, TransferConfig transferConfig) { |
80 | 78 | this.transit = transit; |
81 | | - this.transferConfig = transferConfig != null ? transferConfig : STOP_TO_PATTERN; |
| 79 | + this.transferConfig = transferConfig != null ? transferConfig : OSM_ONLY; |
82 | 80 | } |
83 | 81 |
|
84 | 82 | /// @param indexForUnscopedStopId Map of stop IDs not yet scoped by feed ID, which exists only during GTFS loading |
|
0 commit comments