JOSM: How to drag-select relations?

I’ve been copying/merging data from the Canvec dataset into OSM and one common issue I run into is if I want to select a group of ways/relations/nodes and merge them into another layer using JOSM.

When I drag-select I only get the nodes and ways; not the actual relations. Aside from doing them manually one-by-one in the relations list, how can I modify my selection to include the relations that the selected ways/nodes are a part of?


“parent selected | child parent selected” (Add to Selection)

That search query will add the parent relation and all of its other members to your selection.

PS: If you’re subsequently deleting those merged objects from your CanVec layer, plain drag-selecting is a bad way to go about this. You will also select nodes of ways that are themselves not getting selected (esp. around the edge of your selection area), and plainly deleting after merging will result in malformed ways. You might want to run interim queries to either unselect those nodes or add the way they are in to your selection, before running the above query to add the relations.

Thanks for that; it worked perfectly.

I normally do a drag-select, and do “search within selection” for type:way. For the data I’m working with this results in whole ways that had all their nodes selected being selected, and ones that were partially selected excluded.


Excellent, you didn’t fall into that drag-selection trap, then.

You’ll use that search query so often, you might as well make it into a search shortcut and put it in your button bar.