-
Notifications
You must be signed in to change notification settings - Fork 18
Description
Hi,
Based on:
https://gtfs.org/reference/static/#transferstxt
Indicates the type of connection for the specified (from_stop_id, to_stop_id) pair. Valid options are:
0 or empty - Recommended transfer point between routes.
1 - Timed transfer point between two routes. The departing vehicle is expected to wait for the arriving one and leave sufficient time for a rider to transfer between routes.
2 - Transfer requires a minimum amount of time between arrival and departure to ensure a connection. The time required to transfer is specified by min_transfer_time.
3 - Transfers are not possible between routes at the location.
Therefore, the 'transfer_type' values can be empty, so:
inline Result Feed::add_transfer(const ParsedCsvRow & row)
{
Transfer transfer;
try
{
// Required fields:
transfer.from_stop_id = row.at("from_stop_id");
transfer.to_stop_id = row.at("to_stop_id");
set_field(transfer.transfer_type, row, "transfer_type", false);
// Optional:
set_field(transfer.min_transfer_time, row, "min_transfer_time");
}
should be changed to:
set_field(transfer.transfer_type, row, "transfer_type");