ConstrainedTransfer Data Type

A constrained transfer is a transfer which is restricted in one ore more ways by the transit data provider. It can be guaranteed or stay-seated, have a priority (NOT_ALLOWED, ALLOWED, RECOMMENDED, PREFERRED) or some sort of time constraint attached to it. It is applied to a transfer from a transfer-point to another point. A transfer point is a combination of stop and route/trip.

Implemented Interfaces
Serializable
Properties
name data type constraints description
id FeedScopedId   In NeTEx an interchange have an id, in GTFS a transfer do not. We include it here to enable debugging, logging and system integration. Note! OTP do not use this id, and it is just passed through OTP. There is no service in OTP to look up a transfer by its id.
from TransferPoint  
to TransferPoint  
transferConstraint TransferConstraint   The transfer constraint used for the transfer.
specificityRanking number required Specificity of a transfer The ranking implemented here is slightly modified:
  • The specification do not say anything about Stations even if Stations can be used to specify a transfer-point. In OTP stops are more specific than station, so we use the following transfer-point ranking:
    1. Station: 0 (zero)
    2. Stop: 1
    3. Route: 2
    4. Trip: 3
  • Two transfers may have the same ranking if we add together the from-point and to-point ranking. For example, from trip(3) + to stop(1) == from route(2) + to route(2) have the same ranking. To avoid this problem, we give the from-point a small advantage. We multiply the from point with 11 and the to point with 10, this break the ties in favor of the from point. In the example above the ConstrainedTransfer specificityRanking is:
     Case 1: from trip to stop :=  11 * 3 + 10 * 1 = 43
     Case 2: from route to route :=  11 * 2 + 10 * 2 = 42
     
    Case 1 has the highest ranking.

Example

{
  "id" : {
    "feedId" : "...",
    "id" : "..."
  },
  "from" : {
    "stopTransferPoint" : true,
    "tripTransferPoint" : true,
    "routeStopTransferPoint" : true,
    "routeStationTransferPoint" : true,
    "stationTransferPoint" : true,
    "specificityRanking" : 12345
  },
  "to" : {
    "stopTransferPoint" : true,
    "tripTransferPoint" : true,
    "routeStopTransferPoint" : true,
    "routeStationTransferPoint" : true,
    "stationTransferPoint" : true,
    "specificityRanking" : 12345
  },
  "transferConstraint" : {
    "priority" : "ALLOWED",
    "staySeated" : true,
    "guaranteed" : true,
    "facilitated" : true,
    "notAllowed" : true,
    "regularTransfer" : true,
    "maxWaitTime" : 12345,
    "minTransferTime" : 12345,
    "minTransferTimeSet" : true
  },
  "specificityRanking" : 12345
}