Proposal to connect NHD waterways in Oklahoma with a mechanical edit, requesting feedback

Ok, I think I’ve figured out what I’d like to do. Here are before and after zipped *.osm files, none of these changes have been uploaded. The files contain the objects to be modified and everything sharing nodes with them.

Edit: I made a mistake before, there are a lot of connections to be made where the nodes are exactly 7.2cm apart for some darn reason. The below is updated to reflect upping the range limit from 5cm to 8cm.

  • ok_before.zip - 18.3MB compressed, unzips to a 124MB osm file
  • ok_after.zip - 19.1MB compressed, unzips to a 141.0MB osm file

5,226 ways to delete (all ArtificialPaths inside of bodies of water, with nothing flowing into the body of water to connect to it, and nothing in the NHD to connect to it either.)

About 60% of them, the last node in the way is connected to the beginning of another waterway that would be left dangling, so that node is then merged with one belonging to the body of water (the nearest node within 8 cm).

Then the other 40%, the waterway flowing out of the body of water that our deleted ArtificalPath connects to is already connected to the lake edge, OR there’s just nothing the deleted way was connected to. So simply deleting the way is enough.

There are about 150 ArtificalPaths (already tagged as waterway=stream) inside of lakes I want to leave alone because of one of these cases:

  • The NHD shows something that could connect to it that doesn’t exist in OSM
  • The way inside the waterbody has a name tag
  • There’s a way outside the body of water flowing away from it that would be left connected to nothing because there isn’t a node belonging to the instance of natural=water within about 8cm to merge with
  • There are multiple ArtificialPaths connected to each other inside the same large lake
  • Any of the nodes in the way besides the very last one also belong to another way

20,159 node merges, all but 10 of which involve only two nodes, connecting the end of a waterway to the edge of a body of water where that end had connected to nothing previously. Then 10 instances of 3 nodes being merged because I found some canals I didn’t pick up before whose ends are touching.

And then there are JOSM validator warnings I’ll work through manually before committing changes to an area. I didn’t address them all yet in the files linked above.

I’m really grateful for all of this feedback, and for the ability to pursue this. It’s really satisfying doing this work.

Is it okay for me to create a wiki page, and begin making these changes, do you think? Or should I slow down, or work more on part of it?

Thank you thank you thank you.

2 Likes