I’m not sure how complete the data is, and exactly what you want to do with it / use it for may affect things, but it may be that you want to search for ways that are members of relations tagged with type=route + route=railway. Here’s one such example: Relation: ‪Ely to Norwich Line‬ (‪17015934‬) | OpenStreetMap .

But such a query will also return things you probably don’t want, such as the route of the preserved/heritage “Mid Norfolk Railway”: Relation: ‪North Elmham Branch‬ (‪17012397‬) | OpenStreetMap . So you’ll probably need to do some filtering on the ref=* values from those relations (which appear to be the Engineer’s Line References). RailwayData | Line Files & Gradient Profiles might help you there.

There are various options to filter and export data from OSM. The Overpass API might be suitable for what you want, but I don’t think it offers KML as an output format, so you’d need something to convert what you get at the end.

1 Like