🚧 RC
D1
Where Am I now ?

The "breadcrumbs" element is always present, on top of the page.

It shows you where you are on the lab.

It enables you to reach any page on the lab.

Migrating to OTP2

R&D notes for the planner-v2-1 recipes: an HTTP version of the OTP 2 trip query without the routingProfile abstraction of planner-v2. Every control on these pages writes the query string shown on the right.

How the engine thinks

OTP 2 splits a trip into three street mode slots, and one set of transit modes in between:

access → transit → egress and, computed alongside, direct
access = first mile (origin to the first stop) · egress = last mile (last stop to the destination) · direct = door to door without transit

Each slot takes exactly one value per query: accessMode=bicycle, not "bike or rental bike". Every other combination is another query, which is what planner-v2 does behind its routing profile (up to nine queries per request). The slots are not polyfilled by the api: omit them all for the OTP 2 defaults (foot everywhere); as soon as one is given the others stay unset, so accessMode and egressMode go together (required with transportModes) and omitting directMode means transit only. The one catch-all is flexible (on-demand transport), a street mode with its own limitations: it needs flex data in the graph.

Queries in, shapes out. One query is one triple accessMode / directMode / egressMode; it returns up to two result shapes, [access → transit → egress] and [direct]. So foot / foot / foot is one query returning [walk → transit → walk] + [walk]. The catch is OTP's transit-vs-street filter: transit itineraries slower than the best street-only one are dropped, so a fast direct mode (car, taxi) hides the transit alternatives. Keeping both means a second query with transportModes= empty, or itineraryFiltersDebug=listAll plus client side filtering.

Two recipes

  • planner-v2-1 exposes the three slots and the transit modes as they are: one query.
  • planner-v2-1-preset replaces the three street mode params by one modePreset (transportModes stays and narrows every query) that expands to one or several queries in a single OTP 2 document; results merged, one page cursor for the whole preset (the cursors of the queries travel inside it).

Both share every other parameter (who, where, when, traveller profile). The snippet switches recipe by itself: a modePreset set means the preset recipe, otherwise the slots go to planner-v2-1. Several modePreset values mean several calls.

The demo app

Every option of the UX page exists as a live page in the otp2-migration-demo app: the same native widgets, one settings screen shared by all of them, real searches on the Belgian network.

Open the demo app

On these pages

Command Palette
?
LabData/en/data
ApidateAPI params in:BMC v1BMC v2OTP 1ApidateTimeAPI params in:BMC v1BMC v2OTP 1OTP 2OTP 2.9
LabDataGtfs/en/data/gtfs
LabDataGtfs RT/en/data/gtfs-rt
LabDataGbfs/en/data/gbfs
LabDataRedis/en/data/redis
LabMigrating to OTP2Mode selection UX1a User preferences/en/planner/migrating-to-otp2/mode-ux
LabMigrating to OTP2Mode selection UX4a Rent / park toggles/en/planner/migrating-to-otp2/mode-ux
LabDataGtfsAgencies/en/data/gtfs/feed/agencies/
LabDataGtfsRoutes/en/data/gtfs/feed/routes/
LabDataGtfsTrips/en/data/gtfs/feed/trips/
LabDataGtfsStops/en/data/gtfs/feed/stops/
LabDataGtfsTrip Patterns/en/data/gtfs/trip-patterns
LabDataGtfsGtfs Archives/en/data/gtfs/archives
LabDataGtfs RTAlerts/en/data/gtfs-rt/feed/alerts
LabDataGtfs RTTrip Updates/en/data/gtfs-rt/feed/trip-updates
LabDataGbfsAgencies/en/data/gbfs/agencies
LabDataGbfsStations/en/data/gbfs/stations
LabDataGbfsStation Statuses/en/data/gbfs/station-statuses
LabDataGbfsFree Floating Bikes/en/data/gbfs/free-floating-bikes
LabDataGbfsMap/en/data/gbfs/map
LabDataRedisredisCacher/gtfsRtAlertsDeLijn/en/data/redis/redisCacher/gtfsRtAlertsDeLijn
LabDataRedisredisCacher/gtfsRtAlertsEurostar/en/data/redis/redisCacher/gtfsRtAlertsEurostar
LabDataRedisredisCacher/gtfsRtAlertsNmbsSncb/en/data/redis/redisCacher/gtfsRtAlertsNmbsSncb
LabDataRedisredisCacher/gtfsRtAlertsStibMivb/en/data/redis/redisCacher/gtfsRtAlertsStibMivb
LabDataRedisredisCacher/gtfsRtAlertsTec/en/data/redis/redisCacher/gtfsRtAlertsTec
LabDataRedisredisCacher/gtfsRtAlertsTecRaw/en/data/redis/redisCacher/gtfsRtAlertsTecRaw
LabDataRedisredisCacher/gtfsRtTripUpdatesDeLijn/en/data/redis/redisCacher/gtfsRtTripUpdatesDeLijn
LabDataRedisredisCacher/gtfsRtTripUpdatesEurostar/en/data/redis/redisCacher/gtfsRtTripUpdatesEurostar
LabDataRedisredisCacher/gtfsRtTripUpdatesNmbsSncb/en/data/redis/redisCacher/gtfsRtTripUpdatesNmbsSncb
LabDataRedisredisCacher/gtfsRtTripUpdatesStibMivb/en/data/redis/redisCacher/gtfsRtTripUpdatesStibMivb
LabDataRedisredisCacher/gtfsRtTripUpdatesTec/en/data/redis/redisCacher/gtfsRtTripUpdatesTec
LabDataRedisredisCacher/gtfsRtTripUpdatesDeLijnRaw/en/data/redis/redisCacher/gtfsRtTripUpdatesDeLijnRaw
LabDataRedisredisCacher/gtfsRtTripUpdatesEurostarRaw/en/data/redis/redisCacher/gtfsRtTripUpdatesEurostarRaw
LabDataRedisredisCacher/gtfsRtTripUpdatesNmbsSncbRaw/en/data/redis/redisCacher/gtfsRtTripUpdatesNmbsSncbRaw
LabDataRedisredisCacher/gtfsRtTripUpdatesTecRaw/en/data/redis/redisCacher/gtfsRtTripUpdatesTecRaw
LabDataRedisredisCacher/pointsByLinesStibMivb/en/data/redis/redisCacher/pointsByLinesStibMivb
LabDataRedisredisCacher/waitingTimesStibMivb/en/data/redis/redisCacher/waitingTimesStibMivb
LabSearch/en/search
LabPlan/en/planner-home
LabPlanPlanner v1/en/planner-tec-app
LabPlanPlanner v2/en/planner-v2-bmc
LabPlanOTP 1/en/planner
LabPlanOTP 2/en/planner-v2
LabPlanOTP 2.9/en/planner-otp-2-9
LabPlanPlanner v2.1/en/planner-v2-1
LabPlanPlanner v2.1 preset/en/planner-v2-1-preset
LabPlanMigrating to OTP2/en/planner/migrating-to-otp2
LabPlanMigrating to OTP2Get started/en/planner/migrating-to-otp2
LabMigrating to OTP2Get startedHow the engine thinks/en/planner/migrating-to-otp2
LabMigrating to OTP2Get startedTwo recipes/en/planner/migrating-to-otp2
LabMigrating to OTP2Get startedOn these pages/en/planner/migrating-to-otp2
LabPlanMigrating to OTP2Mode selection UX/en/planner/migrating-to-otp2/mode-ux
LabMigrating to OTP2Mode selection UX1 Global settings/en/planner/migrating-to-otp2/mode-ux
LabMigrating to OTP2Mode selection UX1b Restrict modes/en/planner/migrating-to-otp2/mode-ux
LabMigrating to OTP2Mode selection UX2 Presets + more + custom/en/planner/migrating-to-otp2/mode-ux
LabMigrating to OTP2Mode selection UX2b Multimodal presets/en/planner/migrating-to-otp2/mode-ux
LabMigrating to OTP2Mode selection UX3 Open listbox/en/planner/migrating-to-otp2/mode-ux
LabMigrating to OTP2Mode selection UX4b Vehicle switch/en/planner/migrating-to-otp2/mode-ux
LabMigrating to OTP2Mode selection UXPros & cons/en/planner/migrating-to-otp2/mode-ux
LabPlanMigrating to OTP2Query matrix/en/planner/migrating-to-otp2/query-matrix
LabPlanMigrating to OTP2Coverage review/en/planner/migrating-to-otp2/coverage-review
LabMigrating to OTP2Coverage reviewStreet modes/en/planner/migrating-to-otp2/coverage-review
LabMigrating to OTP2Coverage reviewTransit-vs-street filter/en/planner/migrating-to-otp2/coverage-review
LabMigrating to OTP2Coverage reviewUnset slots/en/planner/migrating-to-otp2/coverage-review
LabMigrating to OTP2Coverage reviewTransit modes/en/planner/migrating-to-otp2/coverage-review
LabMigrating to OTP2Coverage reviewWho: operators, lines/en/planner/migrating-to-otp2/coverage-review
LabMigrating to OTP2Coverage reviewWhere: places/en/planner/migrating-to-otp2/coverage-review
LabMigrating to OTP2Coverage reviewWhen: time/en/planner/migrating-to-otp2/coverage-review
LabMigrating to OTP2Coverage reviewTraveller profile/en/planner/migrating-to-otp2/coverage-review
LabMigrating to OTP2Coverage reviewIntents check/en/planner/migrating-to-otp2/coverage-review
LabMigrating to OTP2Coverage reviewPreset recipe/en/planner/migrating-to-otp2/coverage-review
LabMigrating to OTP2Coverage reviewOne cursor, many queries/en/planner/migrating-to-otp2/coverage-review
LabMigrating to OTP2Coverage reviewBudget per shape/en/planner/migrating-to-otp2/coverage-review
LabMigrating to OTP2Coverage reviewRecommendations/en/planner/migrating-to-otp2/coverage-review
LabMap/en/map
LabMapMap Base/en/map/base-light
LabMapMap Transit/en/map/transit-light
LabMapMap Transit (via proxy)/en/map/transit-light-proxy
LabDeparture/en/departure
LabDoc/en/doc
LabDocPlanner Cases Library/en/doc/planner-lib
LabDocUi/Ux/en/doc/user-interface
LabDocUi/UxPlanner/en/doc/user-interface/planner/
LabUi/UxPlannerInstant | Duration | Distance/en/doc/user-interface/planner/
LabUi/UxPlannerItinerary Time Overview/en/doc/user-interface/planner/
LabUi/UxPlannerLeg Overview/en/doc/user-interface/planner/
LabUi/UxPlannerItinerary Overview/en/doc/user-interface/planner/
LabUi/UxPlannerLeg Detail/en/doc/user-interface/planner/
LabDocUi/UxDeparture/en/doc/user-interface/departure
LabDocUi/UxInput/en/doc/user-interface/input/
LabHelp/en/help
ApifromPlaceAPI params in:BMC v1BMC v2OTP 1OTP 2OTP 2.9ApitoPlaceAPI params in:BMC v1BMC v2OTP 1OTP 2OTP 2.9ApiarriveByAPI params in:BMC v1BMC v2OTP 1OTP 2OTP 2.9ApitimeAPI params in:BMC v1BMC v2OTP 1ApibannedAgenciesAPI params in:BMC v1OTP 1OTP 2OTP 2.9ApibannedRoutesAPI params in:BMC v1OTP 1ApiwalkSpeedAPI params in:BMC v1OTP 1OTP 2OTP 2.9ApiwheelchairAPI params in:BMC v1BMC v2OTP 1ApinumItinerariesAPI params in:BMC v1BMC v2OTP 1ApimodeAPI params in:BMC v1BMC v2OTP 1ApialightSlackAPI params in:BMC v1BMC v2OTP 1ApiboardSlackAPI params in:BMC v1BMC v2OTP 1ApilocaleAPI params in:BMC v1OTP 1ApishowIntermediateStopsAPI params in:BMC v1OTP 1ApimaxWalkDistanceAPI params in:BMC v1OTP 1ApistartTransitStopIdAPI params in:BMC v1OTP 1ApistartTransitTripIdAPI params in:BMC v1OTP 1ApiwaitReluctanceAPI params in:BMC v1OTP 1OTP 2OTP 2.9ApiwalkReluctanceAPI params in:BMC v1OTP 1OTP 2OTP 2.9ApiroutingProfileAPI params in:BMC v2ApipageCursorsAPI params in:BMC v2ApibannedStopsAPI params in:OTP 1ApibannedStopsHardAPI params in:OTP 1ApibannedTripsAPI params in:OTP 1ApibatchAPI params in:OTP 1ApibikeBoardCostAPI params in:OTP 1ApibikeSpeedAPI params in:OTP 1OTP 2OTP 2.9ApibikeSwitchCostAPI params in:OTP 1ApidisableAlertFilteringAPI params in:OTP 1ApidisableRemainingWeightHeuristicAPI params in:OTP 1ApigeoidElevationAPI params in:OTP 1ApiignoreRealtimeUpdatesAPI params in:OTP 1OTP 2OTP 2.9ApiintermediatePlacesAPI params in:OTP 1ApimaxHoursAPI params in:OTP 1ApimaxPreTransitTimeAPI params in:OTP 1ApimaxTransfersAPI params in:OTP 1ApiminTransferTimeAPI params in:OTP 1ApinonpreferredTransferPenaltyAPI params in:OTP 1ApioptimizeAPI params in:OTP 1ApiotherThanPreferredRoutesPenaltyAPI params in:OTP 1ApipreferredAgenciesAPI params in:OTP 1ApipreferredRoutesAPI params in:OTP 1ApireverseOptimizeOnTheFlyAPI params in:OTP 1ApitransferPenaltyAPI params in:OTP 1OTP 2OTP 2.9ApitriangleSafetyFactorAPI params in:OTP 1ApitriangleSlopeFactorAPI params in:OTP 1ApitriangleTimeFactorAPI params in:OTP 1ApiunpreferredAgenciesAPI params in:OTP 1ApiunpreferredRoutesAPI params in:OTP 1ApiuseRequestedDateTimeInMaxHoursAPI params in:OTP 1ApiwaitAtBeginningFactorAPI params in:OTP 1ApiwalkBoardCostAPI params in:OTP 1ApitimetableViewAPI params in:OTP 2OTP 2.9ApinumTripPatternsAPI params in:OTP 2OTP 2.9ApimaximumTransfersAPI params in:OTP 2OTP 2.9ApimaximumAdditionalTransfersAPI params in:OTP 2OTP 2.9ApisearchWindowAPI params in:OTP 2OTP 2.9ApiincludePlannedCancellationsAPI params in:OTP 2OTP 2.9ApiincludeRealtimeCancellationsAPI params in:OTP 2OTP 2.9ApitransferSlackAPI params in:OTP 2OTP 2.9ApiboardSlackDefaultAPI params in:OTP 2OTP 2.9ApiboardSlackListAPI params in:OTP 2OTP 2.9ApialightSlackDefaultAPI params in:OTP 2OTP 2.9ApialightSlackListAPI params in:OTP 2OTP 2.9ApibicycleOptimisationMethodAPI params in:OTP 2OTP 2.9ApitransportModesAPI params in:OTP 2OTP 2.9ApiegressModeAPI params in:OTP 2OTP 2.9ApidirectModeAPI params in:OTP 2OTP 2.9ApiaccessModeAPI params in:OTP 2OTP 2.9ApiitineraryFiltersDebugAPI params in:OTP 2OTP 2.9ApipageCursorAPI params in:OTP 2OTP 2.9ApiwheelchairAccessibleAPI params in:OTP 2OTP 2.9ApitriangleFactorsSafetyAPI params in:OTP 2OTP 2.9ApitriangleFactorsSlopeAPI params in:OTP 2OTP 2.9ApitriangleFactorsTimeAPI params in:OTP 2OTP 2.9ApiuseBikeRentalAvailabilityInformationAPI params in:OTP 2OTP 2.9ApimaxDirectDurationForModeAPI params in:OTP 2OTP 2.9ApifiltersAPI params in:OTP 2OTP 2.9ApirelaxTransitGroupPriorityAPI params in:OTP 2OTP 2.9ApiwhiteListedAgenciesAPI params in:ApibannedLinesAPI params in:ApiwhiteListedLinesAPI params in:ApibannedServiceJourneysAPI params in:ApibannedRentalNetworksAPI params in:ApiwhiteListedRentalNetworksAPI params in:ApipassThroughPointsAPI params in:ApirelaxTransitGroupPriorityRatioAPI params in:ApirelaxTransitGroupPriorityConstantAPI params in:ApimaxAccessEgressDurationForModeAPI params in:ApimodePresetAPI params in:
DocOTP 1Full Open API Documentation
DocOTP 2Full Open API Documentation
DocOTP 2.9Full Open API Documentation
DocPlanner v1Full Open API Documentation
DocPlanner v2Full Open API Documentation
DocPlanner v2.1Full Open API Documentation
DocPlanner v2.1 presetFull Open API Documentation