I'm trying to do some network analysis on some road data. Each of my road features has a "structures" field showing the number of structures along that road. I want to update this feature to show the total number of structures that "drain" into that road, like a river tributary. That is, given a road, I want its "structures" attribute to show the total number of structures that feed into that road (so a central road would have a high count).

I've tried using the Trace Network tool in ArcGIS Pro. After creating the trace network, I ran the "trace" tool. In the Starting Points parameter, I inputted points representing dangling ends of roads (ends that are not attached to another road segment). Under advanced options -> functions, I selected the function "Add" and selected my structure attribute. After running, my structure attribute was not modified. Am I on the right track, or does ArcGIS Pro has a better tool for the task?

road network example

  • @PolyGeo A Shreve count seems to be what I want. The "stream order" tool in ArcGIS Pro appears to have this functionality--looking into it. Commented Jul 12, 2023 at 16:37
  • +1 nice question
    – FelixIP
    Commented Jul 12, 2023 at 22:03

2 Answers 2


I think algorithm is as follows.

Define receiving nodes (centers) and compute their service area:

enter image description here

For every node with weight trace network to parent center:

enter image description here

accumulate flow (by adding nodes' load) as you go in relevant network edges:

enter image description here

I did it using networkx module, but I think it is doable with network analyst, you might need a model or script.

The next picture shows traffic flow in roads to facilities with different receiving capacity, which can be useful in emergency planning:

enter image description here

Not sure if this is doable with network analyst.


Networx deals with graphs. Graph is roughly a collection of nodes(points) connected by edges(lines). Lines should contain information on from node ID and to node ID. When this info computed the rest of work is piece of cake. This is why I am suggesting to start with transfer of node names (just OID is enough) to single part (!) polylines table. Perhaps extract end points of your roads, delete identical and use this solution. Topology is important, i.e. edges are connected through shared node(!).

  • This methodology makes sense and appears to be a solution to my problem. Could you possibly share more information about how you did this? I'm not sure where to start with either Networkx or ArcGIS Pro's Network Analyst. Commented Jul 13, 2023 at 16:38
  • I afraid networkx is too big topic to cover. Just search for graph, networkx and do simple things first using script snippets, e.g. networkx.org/documentation/networkx-2.0/reference/readwrite/…
    – FelixIP
    Commented Jul 13, 2023 at 21:10
  • Got it, I'll dig into networkx! Commented Jul 14, 2023 at 21:51
  • 1
    That's the spirit! See update to my post. You won't regret learning this package.
    – FelixIP
    Commented Jul 14, 2023 at 23:44

I caution you in using Shreve order as the logic behind that concept is expecting a dendritic network (i.e. rivers). Also, it is a count on sources not an accumulating number (e.g. your structure count) encoded into each line. Even with your sample image you show the issue with road network in that you can go around in circles, so which way do you "drain". It's non-sensical what you are asking.

Researching this site leads to Accumulating values on edges on network dataset ArcGIS Desktop which is a solution that may be the answer to your problem.

  • That makes sense about the Shreve. I've research a bit, but I'm struggling to find a solution. I checked out the post you linked, and the problem seems similar, but I don't have a way to define all possible routes like in that case. I'm trying to think of a way that I could use Spatial Join, but I'm not sure, since it seems that I would need to do this iteratively in order to "drain" the roads all the way to the most central roads. Commented Jul 12, 2023 at 20:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.