AnsweredAssumed Answered

Technique to programmatically determine the immediate upstream and downstream features to a given feature in my electric geometric network?

Question asked by SpatialCrunch on Apr 26, 2017
Latest reply on May 2, 2017 by SpatialCrunch

I am relatively new to ESRI geometric networks and working with an electric distribution system model in a file gdb.  My goal is to make a python script that generates an export file that our power modeling software WindMil can use.  I want to iterate through every feature in our GN and as efficiently as possible determine the immediate upstream feature(s) because each row in the csv export has to have the identifier of the current feature and the id of the immediate upstream feature.  I have learned to use arcpy to perform network traces but I see no clear-cut way to get the immediate upstream feature.  All I can think of is to find all the features immediately connected to my feature by geometry, then run an upstream trace and check to see what immediately connected features are also in the upstream trace features.  This seems inefficient to do 80,000 times.  Is there a better way?  There probably is something incredibly easy I am just not seeing...

Thanks! Jessica

Outcomes