Journey planner lat/longs causing multiple choices redirect (300)

Could someone explain why a destination in a lat/lon format can return a disambiguation error response? Surely each location should be mapped to a single point.

Query: Journey/JourneyResults/51.53089%2C-0.12292/to/52.19408%2C0.13746?date=20170828&time=0854&nationalSearch=true

Response:

Hi @plew - this is bizzare.

I’ve raised a bug ticket (SVC-4345) to investigate this and we’ll let you know once we have an answer.

Thanks,
James
Technology Service Operations, TfL

Hi,

I’m facing the same issue. I’m running in this for the coordinate of several London tube/rail stations. One sample:
https://api.tfl.gov.uk/Journey/JourneyResults/51.503071,-0.280288/to/51.507832,-0.007221

In none of the case I see, the disambiguation had disambiguation options.

Thanks for looking into this.

Hey, any progress on the issue?

Cheers.

Hi @plew

This has been added into the next sprint which begins on 9th October.

I’ll let you know how that is being progressed.

Thanks,
James

Great, thanks for the update!

Hi @plew

Thanks for your patience in this.

We have identified why the call you are making has returned a disambiguation.

The destination in this case is outside of where we have geographical location in the journey planner back-end. We currently only hold Geo data for London and your destination is in Cambridge.

Expanding Geo data to outside of London (and potentially all of Great Britain) may be something that we do in the future but there is no current project to deliver that.

For locations outside of London, we can only advise that you plan on the NaPTAN level which should return the journey you desire.

Thanks,
James

Hi @jamesevans

I’m trying to do the search using naptan IDs but am still not getting results back. For London - Manchester, I’ve tried the following non-lat/long search terms for Manchester:

Naptan ID found via the endpoint StopPoint/Search/manchester?modes=national-rail - 910GMNCRPIC
UK postcode - M2 4WU
Common name - Manchester, England

I’ve tried matching the stoppoint to Manchester lat longs here: /StopPoint?stopTypes=NaptanBusCoachStation%2CNaptanBusWayPoint%2CNaptanCoachAccessArea%2CNaptanCoachBay%2CNaptanCoachEntrance%2CNaptanMarkedPoint%2CNaptanMetroAccessArea%2CNaptanMetroEntrance%2CNaptanMetroPlatform%2CNaptanMetroStation%2CNaptanOnstreetBusCoachStopCluster%2CNaptanOnstreetBusCoachStopPair%2CNaptanPrivateBusCoachTram%2CNaptanPublicBusCoachTram%2CNaptanRailAccessArea%2CNaptanRailEntrance%2CNaptanRailPlatform%2CNaptanRailStation%2CNaptanUnmarkedPoint%2CTransportInterchange&radius=10000&location.lat=53.47736&location.lon=-2.23091

But get no results.

All of these search terms still return an unidentified disambiguation for the location outside of London. Could you please provide an example of how to return a national rail journey result where either the origin or destination is outside of London?

Cheers!
Phoebe

@jamesevans Any update on this? It is again coming up as an issue for a London - Edinburgh search. All national rail results are inaccessible at the moment due to the 300 error.

I’ve tried looking up the NAPTAN IDs directly, and this is the response I’m getting:

{
"$type": "Tfl.Api.Presentation.Entities.JourneyPlanner.DisambiguationResult, Tfl.Api.Presentation.Entities",
"toLocationDisambiguation": {
"$type": "Tfl.Api.Presentation.Entities.JourneyPlanner.Disambiguation, Tfl.Api.Presentation.Entities",
"disambiguationOptions": [],
"matchStatus": "list"
},
"fromLocationDisambiguation": {
"$type": "Tfl.Api.Presentation.Entities.JourneyPlanner.Disambiguation, Tfl.Api.Presentation.Entities",
"matchStatus": "identified"
},
"viaLocationDisambiguation": {
"$type": "Tfl.Api.Presentation.Entities.JourneyPlanner.Disambiguation, Tfl.Api.Presentation.Entities",
"matchStatus": "empty"
},
"recommendedMaxAgeMinutes": 1440,
"searchCriteria": {
"$type": "Tfl.Api.Presentation.Entities.JourneyPlanner.SearchCriteria, Tfl.Api.Presentation.Entities",
"dateTime": "2018-04-10T19:38:00",
"dateTimeType": "Departing"
},
"journeyVector": {
"$type": "Tfl.Api.Presentation.Entities.JourneyPlanner.JourneyVector, Tfl.Api.Presentation.Entities",
"from": "910GSCARBRO",
"to": "910GEDINBUR",
"via": "",
"uri": "/journey/journeyresults/910gscarbro/to/910gedinbur?date=20180410&time=1938&nationalsearch=true"
}
}