Skip to content

OJPTripRequest

OJP Trip Service

TripRequest is the main service. A trip can be planned by specifying origin and destination.

A trip has multiple legs (sections).

Please study the trip terminology at the very top of the page.

Request

Element Cardinality Description Example
RequestTimestamp 1:1 The timestamp of the request. Preferably in UTC.
MessageIdentifier 0:1  The identifier of the message. Preferably issued in strictly monotonously increasing order.
ojp:Origin 1:*  The starting point of the search. OJP offers quite a lot of ways to model this.

More information can be found in the relevant section.

ojp:Destination 1:*  The destination point of the search. OJP offers quite a lot of ways to model this.

More information can be found in the relevant section.

ojp:Via 0:1  The system supports one “via”. If the user wishes to include multiple vias or to calculate a round trip, the requesting system must divide it up into individual trips and conduct a separate search for each of them.

ojp:Params 0:1  Other parameters. See relevant section

Origin/Destination structure

Elemente Cardinality Description Example
 ojp:PlaceRef/siri:StopPointRef 0:1 Reference to StopPoint

ojp:PlaceRef/ojp:StopPlaceRef 0:1 Reference to a stop

ojp:PlaceRef/ojp:GeoPosition 0:1 WGS84 coordinates

ojp:PlaceRef/ojp:TopographicPlaceRef 0:1 Reference to a location. Difficult because the values cannot be guessed

 

ojp:PlaceRef/ojp:PointOfInterestRef 0:1 Reference to a Point of Interest. The Location Name is ignored.

T

ojp:PlaceRef/ojp:AddressRef 0:1 Reference to an address TODO: Example
ojp:PlaceRef/ojp:LocationName 0:1 Public name of the location

Please note: The name is ignored. First perform a LocationRequest which will return a reference or coordinate.

ojp:DepArrtime 0:1 Time to be used

“Z” is Zulu time (i.e. independent of time zones). With Z, it is essential that the seconds are also specified. If the format is not correct or there is no Z, the machine tries to interpret the time as local time.

ojp:TimeAllowance 0:1 Instead of DepArrTime. Additional time required to reach or leave the location.

IndividualTransportOptions 0:* Options for travel to and from the stops

See separate table

TODO: Example

 

Elemente Cardinality Description Example
 ojp:Mode 1:1  The mode to be used to reach the origin. Only “walk” is currently supported.

Other values:

  • walk
  • cycle
  • taxi
  • self-drive-car
  • others-drive-car
  • motorcycle
  • truck
ojp:MaxDistance 0:1  Maximum distance in metres. This is used to narrow down the routes.
ojp:MaxDuration 0:1  Maximum duration. Indicates the maximum duration of the route. Please note the format. It is xs:duration.
ojp:MinDistance 0:1   Minimum distance in metres. This is used to narrow down the routes.

This feature is not supported.

ojp:MinDuration 0:1 Minimum duration. Indicates the minimum duration of the route. Please note the format. It is xs:duration.

This feature is not supported.

ojp:Speed 0:1  Relative speed in percent. Normal is 100%.

Params

Element Cardinality Description Example
ojp:PtModeFilter  0:1 The filter indicates the modes to take into consideration.

The lists of modes and submodes come from SIRI. They are listed in the XSD.

ojp:LineFilter  0:1 Lines that are to be included or excluded.

TODO: This feature is planned.

 TODO: Example
ojp:OperatorFilter 0:1 Operators that are to be included or excluded. TODO: Example
ojp:PrivateModeFilter 0:1 Include private modes or not.

This feature is not available.

n/a
ojp:NoSingleStep 0:1 The user cannot navigate a level change.

This feature is not available.

 n/a
ojp:NoStairs 0:1 The user cannot navigate stairs.

TODO: This feature is planned.

n/a
ojp:NoEscalator 0:1 The user cannot navigate an escalator.

TODO: This feature is planned.

n/a
ojp:NoElevator 0:1 The user cannot navigate an elevator.

TODO: This feature is planned.

n/a
ojp:NoRamp 0:1 The user cannot navigate a ramp

This feature is not available.

n/a
ojp:LevelEntrance 0:1 The user requires entrances/crossings at ground level

TODO: This feature is planned.

n/a
ojp:BikeTransport 0:1 The user wants to bring along a bicycle

TODO: This feature is planned. However, the data does not support this element.

n/a
ojp:WalkSpeed 0: Deviation from normal walking speed. 100% normal.

TODO: This feature is planned.

n/a
ojp:NumberOfResults 0:1 Quantity of results

TODO: This feature is planned.

TODO: Beispiel
ojp:NumberOfResultsBefore 0:1 NumberOfResultsBefore=n and Destination.

DepArrTime = earliest found EndTime in the last response minus 1 minute if an OJP client wants to receive the next earlier response to the rides already received.

TODO: Beispiel
ojp:NumberOfResultsAfter 0:1 Number of results after a given time (at the finish or at the start)

If an OJP client wants to receive next to the already received trips later, it must send a new request with NumberOfResultsAfter=n and Origin.DepArrTime = latest found StartTime in the last response plus 1 minute.

TODO: Beispiel
ojp:IgnoreRealtimeData 0:1 Include real-time data?

TODO: This feature is planned.

n/a
ojp:ImmediateTripStart 0:1 Assume that the user is already on the way?

This element is not supported.

n/a
ojp:TransferLimit 0:1 Maximum number of changes TODO: Beispiel
ojp:OptimisationMethod 0:1 Use which optimisation method?

fastest, least walking, etc

This feature is planned.

TODO: Add more, provided the scope is clear.

n/a
ojp:ItModesToCover 0:* Find a separate monomodal trip for each mode in the list, in addition to the intermodal ones.

Not supported by the current data.

n/a
ojp:IncludeTrackSection 0:1 Include TrackSection information that permits the geographical projection of a leg. It returns TrackStart, TrackEnd and Duration.

Of course, the information has to be available (currently not really the case).

ojp:IncludeLegProjection 0:1 Include the geographical presentation of a leg in the result? This is currently suppressed for public transport legs because the route is not known. This will still be done for the “walk” legs.

This feature is planned.

ojp:IncludeTurnDescription 0:1 A detailed description of the route of each leg is provided in the PathGuidance.

ojp:IncludeAccessibility 0:1 Include disability information?

This feature is planned.

ojp:IncludeIntermediateStops 0:1 Show stops along the individual trip, i.e. all the intermediate stops?

ojp:IncludeFare 0:1  Include price details?

This feature is currently not supported.

 

Response

An example of a complete response: tripresponse

First ojp:TripResponseContext is returned. It contains information on all the places used (stops, locations, addresses, etc.) in the ojp:Places: element

In future the context may also include the situations (faults).

This is followed by 0:* TripResult. The header is followed by

the individual trips.

If not calculating from and to a stop, the legs leading up to the stop are shown first.

Otherwise a TimedLeg follows.

Please note existing bugs:

  • Real-time data is unfortunately not yet available. Otherwise, the respective details would already have been integrated.
  • The XXXRefs are still going to change.
  • The DestinationStopPointRefs are not ideal yet.
  • The attributes are formed from the known attributes starting with A__ . We may find a different solution for this.

TransferLegs are used for changes:

Improvements will be necessary particularly for transfers in terms of BehiG (disability equality legislation).

Geographical information used

The walking routes are based on OSM.

The following parts are currently based exclusively on OSM:

  • in ContinuousLeg and TransferLeg (TransferMode=walk):
  • TrackSection (without coordinates because the LegProjection can only be configured for all leg types together due to missing trip routes)
  • TurnAction
  • in TimedLeg
  • LegIntermediates

Important:

  • IncludeLegProjection is not supported as long as the data do not include the trip routes
  • IncludeAccessibility will only be supported once BehiG enters into force

TODO: This part still needs a lot of further development.