Railway sleepers -since the 1820’s these things have been supporting tracks all over the world.
They might be seen as a kind of barcode, if they were laid at slightly varying distances from each other (or at small angles to each other). Ok, it might seriously test the patience of the average squad of navvies to have to locate them precisely enough to still support the load and also contain some kind of message, but a jig could certainly be devised to place them quite precisely.
Today’s invention is to provide passing trains with sleeper-encoded information. This would probably best be a description of eg the station currently being approached, some information about the maximum speed allowed and also where to brake.
This might be a valuable augmentation to existing safety procedures, if the message could be picked up by a camera under the engine or even by a spring-loaded rod tapping on successive sleepers..