I am a little confused. You said you have km as stops but you used x position and y position.
However, if you want a straight line, like a loading bar, and your train to move on that, you can use this on x position.
sPos is what you want your start value to be. I chose 100 away from the edge of my comp. Same for ePos(just end).
minValue and maxValue are the minimum and maximum kilometer you provided here. You can change this to whatever you want also. They should be the maximum and minimum value of the column you take your data from.
var sPos = 100; //start position value.
var ePos = 1820; //end position value
var minValue = 105769; //min from table
var maxValue = 120458; //max from table
myData = thisComp.layer("PositionXPositionY.csv")("Data")("Outline");
i = 1;
while (myData("Times")("Times " + i).value < time && i < myData("Times").numProperties - 1) i++;
initTime = myData("Times")("Times " + (i - 1)).value;
endTime = myData("Times")("Times " + i).value;
initRawPosition = eval(myData("PositionX")("PositionX " + (i - 1)).value);
endRawPosition = eval(myData("PositionX")("PositionX " + i).value);
initPosition = linear(initRawPosition,minValue, maxValue,sPos,ePos);
endPosition = linear(endRawPosition,minValue,maxValue,sPos,ePos);
linear(time, initTime, endTime, initPosition, endPosition);
Similar to this technique, you can also turn it into percentage for trim paths. If you take this expression, and modify sPos and ePos to 0 and 100, and put it on a trim paths end property, you will have a line that fills according to the data from your table.
Andrei
My Envato portfolio.