You are not logged in.

Announcement

*** NOTICE: forum.openstreetmap.org is being retired. Please request a category for your community in the new ones as soon as possible using this process, which will allow you to propose your community moderators.
Please create new topics on the new site at community.openstreetmap.org. We expect the migration of data will take a few weeks, you can follow its progress here.***

#1 2021-08-15 10:46:21

Shohreh
Member
Registered: 2012-12-15
Posts: 247

[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>

Last edited by Shohreh (2021-08-16 15:33:08)

Offline

#2 2021-08-16 15:32:33

Shohreh
Member
Registered: 2012-12-15
Posts: 247

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

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.

Offline

Board footer

Powered by FluxBB