Opened 4 weeks ago
Last modified 3 weeks ago
#24856 new enhancement
Allow replace geometry between two existing ways
| Reported by: | aharvey | Owned by: | team |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Plugin utilsplugin2 | Version: | |
| Keywords: | Cc: |
Description
Within the utilsplugin2/replacegeometry at https://github.com/JOSM/josm-plugins/blob/88770b6d1008a3bc1c445d613b680ec4cde3de1b/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/replacegeometry/ReplaceGeometryUtils.java#L226 it requires one of the ways to be new, however sometimes we want to replace the geometry from an existing way into another existing way.
For example if one mapper drew a new way with a better geometry, we want to use the original way to keep the history, but use the new better geometry, so a simple replace geometry between those two ways will throwout the new way to keep the history, but retain its geometry.
For example:
way A
node 1
node 2
node 3
way B
node 4
node 5
node 6
then we want replace geometry to result in
way A
node 4
node 5
node 6
delete way B
delete node 1
delete node 2
delete node 3
Attachments (0)
Change History (2)
comment:1 by , 4 weeks ago
comment:2 by , 3 weeks ago
We can replace an existing node with another one and replacing an existing relation with another one seems to be straight forward by simply removing all tags and members from the target and then copying all tags and members. Only roles and parent relations could be a bit tricky but nothing to complicated
Though, we miss an equivalent to Merge Nodes.
Are there any (good) reasons for not supporting to replace an existing way with another. Could it be problematic in certain cases or under certain circumstances? Would it support edit wars or help hiding malicious edits?
Current workarounds are only workarounds and all tend to be tricky once memberships of relations come into play.



I found some success in asking an LLM to build a new plugin for this https://github.com/andrewharvey/josm-replace-nodes but it's still something I think should be supported in the core.