Looking at the TripPlannerAPI, I can see that there is a param that can be specified in a request called ‘computeMonomodalTripBicycle’ (page 36 under '4.3.12 Querying For Cycling Journeys
') - which specifies that the trip should be planning for a bike-only journey.
I’m just wondering if there are similar parameters available that can filter a trip to be exclusive to only certain types of other transport?
e.g. Train-Only as ‘computeMonomodalTripTrain’, or avoid a certain type of transport e.g. buses.
1 Like
You can exclude specific transport types by adding this to the API call:
&excludedMeans=checkbox
Followed by a list of exclMOT_2=1&exclMOT_4=1 etc etc to exclude specific transport types, using this list to work out what the numbers relate to:
exclMOT_1 = Train
exclMOT_2 = Metro
exclMOT_4 = Light rail
exclMOT_5 = Bus
exclMOT_7 = Coach
exclMOT_9 = Ferry
exclMOT_11 = School bus
So, to exclude all transport types other than trains, you’d add this full string to your API call:
&excludedMeans=checkbox&exclMOT_2=1&exclMOT_4=1&exclMOT_5=1&exclMOT_7=1&exclMOT_9=1&exclMOT_11=1
Good luck!
Andy
1 Like