On the mileage competition page, there is a link to this:
Milepost data (requires some maths)
which goes here:
http://www.mscs.dal.ca/~butler/miles1.lst
Does anyone know where the data comes from and its accuracy?
Sorry, no. My computer tells me that I downloaded it from there on 07/01/2008, so it's not bang up-to-date. In addition some entries appear to be fiction, for example the final one claiming that Birmingham New Street - Birmingham Snow Hill is 0 miles 1 chain.
In section 336, Leeds is given at 185 miles 66 chains from London Kings Cross. Recent publications such Quail and TRACKatlas use 185mi 70ch. This suggests that the data may date from before Leeds station remodelling in 2000.
Track and route mileage and permissible line speeds as at 1 April 2009 are available in a series of 8 files on the Network Rail site
here. Unfortunately the data has been stored inefficiently and the 8 files amount to some 1.3Gb.
I don't use these data sources for routeing purposes. The National Routeing Guide tells us:
NRG page A1 said:
The shortest route is calculated by reference to the National Rail Timetable.
So that must be used even if it introduces errors. For example, between Swinton and Meadowhall there are two routes. Fast trains usually go via the former Rotherham Masborough station, stopping trains via Rotherham Central. The National Rail Timetable does not distinguish between them.