Another JOSM relation question

In addition to this issue, I’m also wondering how to add only ways that aren’t already in a relation to that relation. If I select all ways I want in the relation, but some are already part of it, there doesn’t seem to be a way to only add the new ones, and so the ways that are already in are duplicated. This doesn’t seem to cause any big problems, but is extremely inelegant, and I don’t see any way to find and eliminate duplicates.


if you go to the relation window in josm with some items selected (red) on the map, those which are already member of the relation have a light pink/rose background (i think) in the right part of the relation-editor

wambacher - which meens the guy living in wambach

Double Members of a Relation (left side of the relation Editor) are in red color and you can remove the red ones one by one.

But there’s nothing automated? Oh well.

An example may help:
Download and open*[ref=US 1][bbox=-88,24,-80,31]. 116 of the 254 ways are in the relation, but 138 are not. I want to add those that are not to the relation. I can easily select the ways that belong by hitting ctrl-F and searching for type:way ref=“US 1”. But how do I then add these to the relation without duplicating? Is there no way to do this except going down one-by-one?

And I just figured it out. First download all the members of the relation (not sure why this step is necessary, but otherwise the incomplete members stick around), select all the members, then hit ctrl-F and find -selected type:way ref=“US 1”. Now add those to the relation. Kludgy but the result is fine.

I’m going to add another suggestion that uses the “child” and “parent” search terms (it’s not really better, just an alternative, and an example for the child/parent feature):

An expression like child (type=route “US 1”) matches everything that is member of a relation (or node of a way, but that shouldn’t happen here) matched by type=route “US 1”. So if you first select all relevant ways, and then use child (type=route “US 1”) in remove from selection mode, you should get the same result.

Ah, that is slightly easier, since I don’t have to go into the relation first and select all. Thanks.
[edit] even better - I don’t have to download all the members beforehand. I just search for -child ref=“US 1” type:way ref=“US 1”.