Adding a tag to all of the ways in a relation?

I’d like to create a map that highlights the mainline railway routes. There’s a tag already defined for this (usage=main), but it’s not been widely nor consistently used.

Various users have created relations for the different train routes, eg relation 1323496 covers the Thalys train route number 9300 from Paris to Amsterdam. The relation consists of four nodes (the stops) and large number of ways (the route).

How can I best/ most easily add the tag usage=main to all of the ways in a relation?

I assume you are using JOSM as editor, report if not.

If you know the object ID of that relation, you can load only this relation in JOSM by choosing “download Object”, type → relation … and then the ID. also check the option “download relatinn’s elements”.

when this has gone right, you can click that relation with right mouse key in JOSM’s relation list … choose “select all elements” … and you can add a tagg to all members at once.


…after this step you have to deselect the nodes to end up with ways only. I guess the search-filter in JOSM can perform this after you select all members of the relation.

Or set a filter type:node and select the ways with a rectangle.