[SOLVED] [Overpass] Grab train routes + station names?

Hello,

The following query returns regional trains in a given area, but stations are unnamed*:

[out:json][timeout:60];

rel(123);
map_to_area -> .searchArea;

(
  relation["network"~"^TER"]["route"="train"](area.searchArea);
);

out body;
>;
out skel qt;

As a smarter alternative to post-editing (looping through waypoints to each station), is there a way to grab the names in the query?

Thank you.

  • For instance:
<wpt lat="47.9952898" lon="0.1921785">
	<name>node/12387940</name>
	<link href="http://osm.org/browse/node/12387940" />
</wpt>

Turns out BRouter supports a “rail” mode, and it’s fast and easy to draw a route if you don’t have too many to draw.