You are currently reviewing an older revision of this page.
I build a model using ModelBuilder and I have too many junctions close to each other that I would like to merge in order to clean up my model. How do I do this?
The issue with having too many junctions in such a close proximity stems from the quality of the data that the model was build from. If it was built from shapefiles then you should make sure your pipes are all end at points and everything was created using the snapping feature.
Method 1
Rerun ModelBuilder, but make the "Tolerance" in the option "Establish Connectivity Using Spatial Data" bigger than what you used before. This should more sucessfully snap pipe ends together than the previous import, but may now cause other problems such as pipes snapping to other pipes they should not snap to.
Method 2
Similar to Method 1, but with finer user control.
1. Run the View > Network Navigator > Nodes in Close Proximity query. The tolerance is up to you, but it's always a fine line balancing this in being able to pick up the majority of nodes that need to be merged, and making sure you don't inadvertantly pick up nodes that shouldn't be merged.
2. Save the results as Selection Set
3. Optional, but for better results, manually review the Network Navigator Results/Selection Set and Add/Remove nodes from the selection as necessary. Make a new Selection Set from this.
4. With the final selection you are happy with, use View > Network Navigator > Find Adjacent Links
5. Right Click on Drawing > Edit Group > Pipe FlexTable
6. Export these Pipes to .SHP from the FlexTable Dialog
7. Re-select the Final Selection Set of Junctions. Right Click on Drawing->Edit Group->Junction FlexTable
8. In the FlexTable, add in the X Coordinate attribute (if it isn't there already). Global Edit it, and set it as something stupid (like 0). The point of this is to move these Junctions a really large distance away from the Junctions you actually want the pipes to connect to.
9. Setup a new ModelBuilder operation to re-import these Pipes. You don't need to import any of the attributes, just the geometry, so don't bother with setting attributes again. The main thing is to do trial and error with the "Tolerance" value for the "Establish connectivity using Spatial Data" setting. You'll need to set this to a larger value than what you used in the first import, but you don't want it too large otherwise you may start having pipes re-connect to other Junctions you don't want them to.
Up to you, but would probably leave the "Create nodes if none found at endpoint" option OFF, at least initially. You want to force the pipes to re-connect to Junctions already in the model, not create new junctions. You could run 1 ModelBuilder operation, review the results (say with most, but not all pipes succesfully re-connecting), and run subsequent ModelBuilder operations with increased "Tolerance" values to pick up the rest of the pipes not yet re-connected.
10. The ModelBuilder operations(s) should re-snap these pipes. Any that did not, you can re-connect manually.
11. You will now be left behind with a bunch of Junctions orphaned (with an X Coordinate of 0). Use Network Navigator->Orphaned Nodes to select, and delete them from model (no longer required). Make sure none of these Junctions get left behind.
12. Tools->Database Utilities->Update Database Cache. This will reset your drawing extents back to what they should be.