JOSM to "Replace Geometry" "The way to be replaced cannot have any ...

Every so often, when using JOSM to “Replace Geometry” so that I can preserve the history of a way, I get this error popping up.
“The way to be replaced cannot have any nodes with properties or relation members unless they belong to both ways”
I also wonder if my method is incorrect.

For example:
I see a large polygon or relation like a national park that is incorrectly shaped. I have a polygon or relation with the correct mapping which I have loaded in a separate layer. I then decide to merge the correct one/s into the data layer. Then, in the data layer, I select one of the polygons that is to replaced and one of the new correct polygons and select “Replace Geometry” and error message comes up.

I assume that one or more of the nodes around the ‘to be replaced’ polygon has one of it’s nodes being used for a gate or similar and a merge would incorrectly shift that item, or that some of the nodes of the way are merged with nodes of another way.
Do I need to move around the polygon and move such items to their own separate node before the replacement, and is it ok to select the ‘to be replaced’ polygon and then Tools>Unglue Ways before doing the replacement.

It would help if Josm or plugins were able to highlight the individual nodes or ways that trigger the error message.

After expressing the above and doing those checks, I find the problem is solved.
…very cathartic :slight_smile:

Hey hey I have the same problem! Can you please share what did you do to fix this please?

Hi, there may be an easier way to accomplish this but this is the way I do it.
If the “The way to be replaced cannot have any nodes with properties or relation members unless they belong to both ways” message appears, the nodes like fords, gates, slipways,etc need to be removed from the mapped way before the “replace geometry” can be done.
I select the way to be replaced, then “select shared child objects” from the Selection menu

Under the “Tags” window you will see a list of the tags used by the problem nodes with all the way nodes selected.
Then use Edit/Search and type in your search item and select the “find in selection” and then you will have only the problem nodes selected.

Select View/zoom to selection (shortcut 3) then you can select the way and the problem node, then Tools/disconnect node from way

If this is the only one then you can select the two ways and “Replace Geometry” and then if necessary rejoin the ford or gate, etc to the new way.

If there are a number of these to disconnected, you will need to do all of them before the “Replace Geometry” step, and you will need to find them all and rejoin if necessary.

If only a few it is easy to do but if lots of them, I suggest using JOSM/Plugins/TODO list - OpenStreetMap Wiki plugin. Once they are all selected in the “find in selection” step earlier, add them to the ToDo list. If you select ‘Pass’ after disconnecting each node you will be able to use the ToDo list to find them all again to rejoin each after the “Replace Geometry”

Some of the menu items come from the JOSM/Plugins/utilsplugin2 - OpenStreetMap Wiki plugin or others