Modify ↓
#6243 closed defect (duplicate)
operation producing dublicate nodes in ways
Reported by: | mdk | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Core | Version: | tested |
Keywords: | dublicate node | Cc: |
Description
I use JOSM 4021, but the problem exists much longer.
I attached an osm file to see the necessary operations. Use the validator to see the problem.
- way: a normal way with 5 nodes
- way: the same way where node '1' and '2' are merged (select '2', SHIFT-Select '1', press 'M') this way still has 5 nodes.
- way: deleteion of node '3'. The result has now 4 nodes containing the merged node '1;2' twice. This may be one reason for the "dublicate node in way" errors.
- way: starting from way 2 and merging '3' with '1;2'. This time we don't have a dublicate node error and the way has only 3 nodes.
To avoid the dublicate node errors there is a simple check to be done on deleting a node (pseudo code):
delete(a: Node) { for each way w containing a do { int i = w.Index(a); if w.Node(i-1) = w.Node(i+1) { // the node before and after a are the same, so we can remove one of them w.removeNode(w.Node(i+1)); } // remove node a from the way w.removeNode(a); } }
Attachments (1)
Change History (4)
by , 14 years ago
Attachment: | dublicate nodes in way.osm added |
---|
comment:1 by , 14 years ago
comment:2 by , 14 years ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
This was probably fixed in [4053]. Please try this with the latest version of JOSM.