Codes for places are used all over the place, national rail station, airports etc. Even TfL has published it’s list of station codes.
But the new stations (Battersea and Nine Elms) have not been given the “standard” station codes by the DoT so I can’t get the code from the last three characters from the AtocCode.
Is there a “computer friendly” list of these three letter codes along with their AtocCode so I can match them up - I don’t want to have “special” case logic for these two stations.
And yes, the normal pattern for Naptan codes for underground stations (the other 213 of them) is 940GZZLUxyz where xyz is the old TfL three letter code, not three letters plus “UGST”.
BPS is the three letter code (see link in OP) for Battersea Power Station; for Nine Elms the code is NIE; and for Abbey Road it is ABR , so why are you using ZPN, ZNI and BBE? Are these not custom codes you have created?
Not sure why you listed Abbey Road. As a stop on DLR is has the standard DLR prefix with it’s 3 letter station identifier at the end, so my looking at the last three characters of the AtcoCode would work.
The real problem code for me is 940GZZNEUGST as it doesn’t contain NIE. I am currently considering looking for the code in the last six characters of the AtcoCode, but there are bound to be multiple hits with this approach, so sorting the hit list giving priority to codes with matches at the end might be acceptable.
Just to be clear here. I am planning to first query the database when the user types three characters looking at the AtcoCode; when a fourth character is given then the query will look for matches in the stop point’s name. No point in a search before then. As far as I can see the shortest stop point names are four character (Bank & Oval).