User:Dr Kludge/Captain's Logs/osmi/Duplicate node in way

From OpenStreetMap Wiki
Jump to: navigation, search

I have tried several ways to fix the duplicate node in a way problem without deleting the offending nodes. The problem is that I could not figure out a procedure to preserve the original duplicate node. The node has to be deleted and added again.

JOSM Setup

1.) Make sure that "menu bar">View>"Expert Mode" is checked. I don't now if this is required but I do have this setting enabled.

2.) I use several "Display Settings" that help while correcting these kinds-of problems. Use "menu bar">Edit>Preferences... and click on the "Display Settings" icon. Next click on the "OSM Data" tab.

  • Click on "Segment drawing options">"Draw Direction Arrows".
  • Click on "Segment drawing options">"Draw Oneway Arrows".
  • Click on "Select and draw mode options">"Draw virtual nodes in select mode".
  • Click on "Select and draw mode options">"Draw rubber-band helper line".
  • Click on "Options that affect drawing performance">"Smooth map graphics(antialiasing)".
  • Click on "Options that affect drawing performance">"Highlight target ways and nodes".

3.) I use the UtilsPlugin2 plugin. The UtilsPlugin2 plugin provides the menu bar">More Tools>"Add nodes at intersections" tool. Use "menu bar">Edit>Preferences... and click on the "Plugins" icon. Scroll down and install UtilsPlugin2 plugin. You will have to restart JOSM after adding the plugin.

Common Steps

1.) Click on icon in OSMI.

Dupe node 0.png

2.) In the OSMI "Selection" section, click on the "J" icon to edit in JOSM.

Dupe node 1.png

3.) In JOSM, use "menu bar">File>"Save as" to save the data. I use osmi.osm for the file name. Saving the data before you start editing creates a safety net, if your edits go terribly wrong. The backup provides courage for problems that can be quite complex. The file is also a tool to help understand the problem. You can search the file for the node id or way id that are involved.

4.) Back in the OSMI "Selection" section, copy the way id number.

Dupe node 2.png

5.) In a text editor search for this id, 209281462.

6.) If there are many nodes in the way and you cannot see the duplicate node id number, then copy the node id number from the OSMI "Selection" section, 1944762180. Searching on the node id number will help you figure out what kind-of problem that you are facing.

Dupe node 3.png

One type of this problem is two nodes directly at the intersection of two ways.

Dupe node 4.png

This an easier problem to fix.

Dupe node 5.png

The hint that you are working with this kind-of problem is that you see the two ways and square box in JOSM where the duplicate node is at. The arrowheads on the ways can also be useful to see the intersection.

1.) Delete the intersecting node. If the two ways are not intersecting, then this is the wrong procedure. Either use the control z key combination to undo your changes or open the file again and start over.

Dupe node 6.png

  • You can use "menu bar">File>Edit>Search>"Search String"> id:107577686 to find the node that will be deleted.

2.) Make sure that you select the two ways.

Dupe node 7.png

3.) Use the shift i key combination or "menu bar">More Tools>"Add nodes at intersections". This will add the intersecting node back to the ways involved.

Dupe node 7 a.png

I consider uploading the changed data as a tool in this process. The duplicate node problem is not as big of a problem as other issues to fix in the map. Hence, I use one change set for each of these duplicate node corrections. That allows others to roll back the change, if I did not fix the problem correctly. As the image above shows, I can see the new node that corrects the problem, the ways that were involved, and the node that will be deleted. I can compare the id in "1 object to delete" section with the information from OSM Inspector as a final check of my work.

4.) The results of these steps can be found in change set 16704789, way 203432671, way 123163116, and deleted node 107577686.

The next type of this problem is two nodes at the end of a way and intersecting another ways.

1.) In JOSM, use menu bar>File>Edit>Search>Search String> id:1944762180

Dupe node 8.png

The importance of this image is that the image shows all the available ways to search for data in JOSM. The problem is getting a handle on what each of the patterns in the lower part of the screen means and how to use the pattern in searches. "id:" colon says that I know the OSM id for a node, way, or relationship. With that knowledge you can search for the object for editing purposes.

2.) Add a node to each of the ways so that the nodes surround the intersection node.

Dupe node 9.png

These nodes act as a fire break. The nodes stop how far the intersecting ways will be deleted. Also note the number of arrowheads at the intersection in this image. The arrowheads help you see that there are several ways involved with this duplicate node problem.

3.) Delete the intersecting node.

Dupe node 10.png

4.) Depending on how the intersection disintegrates you will need to reconnect the ways. There can be one way that is still connected and another way that is split. In this case, start drawing on the split way to reconnect the way to the other part of the original split way.

Dupe node 11.png

5.) In JOSM, select both parts of the partitioned way. Use the c key or "menu bar">Tools>"Combine Way" tool to recombine the two parts into one way again.

Dupe node 10 a.png

Combining the ways together again is not correct in this example. The "Change Directions?" dialog box popped up to remind me that the tags might not be the same on the two ways. I reconsidered the combination step because of this question. The next step after combination would have been to create the intersecting node with two ways.

5.) If there are two ways distinct ways, then reposition the new intersecting node back over the other way.

Dupe node 12.png

6.) Use the j key or "menu bar">Tools>"Join Node to Way" tool, then use the m key or "menu bar">tools>"Merge Nodes" tool to reconnect the intersection. This sequence makes sure that the ways are not overlapping and correctly connected.

7.) Select any of the remaining surrounding "construction nodes" after deleting and adding back the intersecting node.

Dupe node 13.png

If there are cross walks, highway=crossing, or other features, then use the construction nodes for those features. Otherwise, delete the "construction nodes".

8.) You can review the resulting 16702516 change set, the new node 2360684232 that replaced the original duplicate node 1944762180 for these steps.

Similar Problems are ways intersecting areas.

Simply use the procedures above to fix these duplicate node problems. You can successfully use the procedures above, when you are dealing with one way intersecting one area or a way that is closed forming a polygon.

Similar Problems are ways intersecting multiple areas.

todo a new procedure has to be created.