You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Merge railway route relations into transport_lines #1248
A type=routeroute=railway relation represents a railway line (as opposed to a passenger train service). It identifies the physical infrastructure but doesn’t represent the physical infrastructure per se, and it isn’t relevant to routing. Concurrencies within a given time period are unlikely and probably illogical, but a way may be a member of multiple route=railway relations over time.
The tiles should conflate these relations with the member ways to form new linestring features in the transport_lines layer, replacing the member ways’ linestring features. Properties like name would come from the way, falling back to the relation. If the way is a member of multiple relations in different time periods, there would be multiple linestring features. This will allow stylesheets to continue to render tracks based on transport_lines without having to consider the interaction between ways and relations.
According to the statement , the vtiles pipeline would generate a single feature in transport_lines for this way, using the way’s geometry and way tags as the base, and then adding line‑level attributes from the relation.
Way‑derived attributes (higher priority):
name=Graham Line
class=railway
type=rail
start_date=1909-01
Relation‑derived attributes (line‑level):
route_name=Erie Mainline
route_class=route
route_type=railway
So the resulting transport_lines feature keeps the physical track description from the way, and supplements it with route/line information from the type=route + route=railway relation.
What about the case where a way belongs to more than one type=route + route=railway relation? Should this result in duplicated features in transport_lines (one per relation), or is there a preferred way to combine them?
If the relation has date tags (for example start_date / end_date ), should these be added to transport_lines as route_start_date and route_end_date?
some other relations may have other attributes: operator, network, ref, etc.) that you expect to be consistently propagated into transport_lines?
What about the case where a way belongs to more than one type=route + route=railway relation? Should this result in duplicated features in transport_lines (one per relation), or is there a preferred way to combine them?
I suspect the answer would be similar to #1276 (comment), but there may be nuances around route=railway semantics that I’m not as familiar with. I’ve asked for some opinions in Discourse Chat and OSMUS Slack.
some other relations may have other attributes: operator, network, ref, etc.) that you expect to be consistently propagated into transport_lines?
I’m pretty sure operator=* and ref=* would be of interest in both North America and Europe. We could also look at what OpenRailwayMap is consuming from OSM.
route=railway relations are now part of the transport_lines layer. Each member way keeps its own tags and gets route_name, route_ref and route_operator from the relation. When the relation changes over time, the way gets one feature per relation period.
Activity
Rub21 commentedon Feb 3, 2026
To check my understanding of the proposal:
I ran this query in overpass
In most cases, I find
railway=railways that belong to a singletype=route+route=railwayrelation.Example way: https://www.openhistoricalmap.org/way/200451888
Way tags:
name=Graham Linerailway=railstart_date=1909-01This way is a member of relation: https://www.openhistoricalmap.org/relation/2827805
Relation tags:
name=Erie Mainlineroute=railwaytype=routeAccording to the statement , the vtiles pipeline would generate a single feature in
transport_linesfor this way, using the way’s geometry and way tags as the base, and then adding line‑level attributes from the relation.Way‑derived attributes (higher priority):
name=Graham Lineclass=railwaytype=railstart_date=1909-01Relation‑derived attributes (line‑level):
route_name=Erie Mainlineroute_class=routeroute_type=railwaySo the resulting
transport_linesfeature keeps the physical track description from the way, and supplements it with route/line information from thetype=route+route=railwayrelation.What about the case where a way belongs to more than one type=route + route=railway relation? Should this result in duplicated features in transport_lines (one per relation), or is there a preferred way to combine them?
If the relation has date tags (for example start_date / end_date ), should these be added to transport_lines as route_start_date and route_end_date?
some other relations may have other attributes: operator, network, ref, etc.) that you expect to be consistently propagated into transport_lines?
1ec5 commentedon Feb 3, 2026
I suspect the answer would be similar to #1276 (comment), but there may be nuances around
route=railwaysemantics that I’m not as familiar with. I’ve asked for some opinions in Discourse Chat and OSMUS Slack.I’m pretty sure
operator=*andref=*would be of interest in both North America and Europe. We could also look at what OpenRailwayMap is consuming from OSM.Rub21 commentedon Nov 9, 2026
route=railwayrelations are now part of thetransport_lineslayer. Each member way keeps its own tags and getsroute_name,route_refandroute_operatorfrom the relation. When the relation changes over time, the way gets one feature per relation period.e.g:
https://www.openhistoricalmap.org/way/200451888 - https://vtiles.openhistoricalmap.org/#18/41.455756/-74.11757