DC electric railways produce magnetic fields, not only from the intended traction currents, but also from unintended earth-leakage currents; these fields, particularly those from the leakage currents, are becoming an increasing problem for geomagneticians. This paper introduces the relevant properties of DC-railway tractionpower circuits, and the various ways in which earth-leakage currents are produced, and discusses models of how these leakage currents vary along the track and with train position. It describes the geometry of the resultant magnetic fields, and gives the formal algebra for calculating the magnetic field when these leakage currents are known, but also suggests some simple approximations that could be used when the current distribution is not known in detail. This paper also summarises previous relevant papers.