Trying to identify dangle nodes (cul-de-sacs)

05-24-2012 05:48 AM
New Contributor

I am new to Network Analyst and I have built a network from roads data for an entire city. I would like to differentiate between terminal (dangle) nodes and those that are part of an intersection. Specifically, I am trying to determine where cul-de-sacs are in the city and eventually run some analyses on these. However, when I create a network dataset, the nodes seem to be undifferentiated. Ideally, I would like to do this without downloading extensions as I work for a large company and could take time to get approval for downloading something to my machine and I am not familiar with python. Is there an easy way to do this? Thanks!
Tags (2)
0 Kudos
2 Replies
Esri Regular Contributor
You can add the network dataset in ArcMap as the first layer and then run the following VBA. It will write to the immediate window in the VBA window, the OID of the 1 valent junctions and the OID of the connected Edge. You can format the output as needed and write to a file. Change it as needed.
Jay Sandhu

Public Sub List_OneValent_Junctions()
On Error GoTo eh
  Dim pMxDoc As IMxDocument
  Set pMxDoc = ThisDocument
  Dim pNLayer As INetworkLayer
  Set pNLayer = pMxDoc.FocusMap.Layer(0)
  Dim pND As INetworkDataset
  Set pND = pNLayer.NetworkDataset
  Dim pNQ As INetworkQuery
  Set pNQ = pND
  Dim pEnumNE As IEnumNetworkElement
  Set pEnumNE = pNQ.Elements(esriNETJunction)
  Dim pNEdge As INetworkEdge
  Set pNEdge = pNQ.CreateNetworkElement(esriNETEdge)
  Dim pNEFromJunc As INetworkJunction
  Set pNEFromJunc = pNQ.CreateNetworkElement(esriNETJunction)
  Dim pNEToJunc As INetworkJunction
  Set pNEToJunc = pNQ.CreateNetworkElement(esriNETJunction)
  Dim pNE As INetworkElement
  Set pNE = pEnumNE.Next
  Dim pNEJunc As INetworkJunction
  Set pNEJunc = pNE
  Dim val1 As Integer
  val1 = 0
  'Find 1 valent edges and write out Junction OID and Edge OID
  Do Until pNE Is Nothing
    valency = pNEJunc.EdgeCount
    If valency = 1 Then
      pNEJunc.QueryEdge 0, False, pNEdge
      Debug.Print pNEJunc.OID & ", " & pNEdge.OID
     val1 = val1 + 1
    End If
    Set pNE = pEnumNE.Next
  Debug.Print "Total one valent edges: " & val1
  Exit Sub
  MsgBox "Error: " & Err.Description
End Sub
0 Kudos
New Contributor
Thanks for the input. Unfortunately, I do not have a VBA license. Does anyone know a non-scripting way to do this?
0 Kudos