How to duplicate a way in JOSM?

In JOSM you can duplicate a way, but it doesn’t put the new way in the same place. How do I duplicate it properly in the same place?

JOSM seems to put the new way in the center of the visible screen. So you have to do a “zoom to selection” in the view menu, and then choose duplicate way … does it work?

select the way,move cursor (keep way selected (red), press d and you have a Duplicate. thats all.

“D” is for “Delete” :wink:
If you mean Ctrl+D, this will duplicate the selection at the cursor position, not at the same place as the selection.

@NE2: Just for curiosity, why would you need such a functionality?

small d

and to answer your question to ne2:

e.g. a way may be a building. need 20 of them with the same shape. just duplicate. ok?

That was not the original question:

Appears there’s a bug here - see the evolution :slight_smile: http://josm.openstreetmap.de/ticket/5170

Anyway, the purpose is when someone has merged highway and boundary ways and they need to be split. See http://lists.openstreetmap.org/pipermail/talk-us/2010-June/003455.html and previous posts for why boundaries, when they start off with decent precision, should not be tied to roads.

sorry for resurrecting this thread, but i was looking for the same when i discovered it and would like to document my solution for the original problem that i was planing to solve with the duplication of the way: the tedious creation of duplicate ways for use in areas (where it makes sense). to do that one has often to create a way with some of the exact same nodes as an existing way and some additional nodes. think of a forest with a complex border that is mapped already and you want to map the meadow beside it. thanks to IRC i discovered http://josm.openstreetmap.de/wiki/Help/Action/FollowLine which is very well suited for this kind of problem.

I wanted to do this because the same building has two levels, each with a different store. stefanct helped me realize that I could use the same nodes, but a different way. In JOSM, you can do this by clicking ‘Draw nodes’, then just clicking each node in the pre-existing way in clockwise order (or counter-clockwise, doesn’t really matter unless it’s a road or something).