1

I'm using ArcGIS 10.2.2 python 2.7

We have large electric grid dataset, and we want to know which OHL or Cable is first to leave from transformer(Flag) which is second and so on.... arcpy.TraceGeometricNetwork_management returns everything at once.

One idea I have is to make points where line segments end and use this as Barrier. Then on another iteration the barrier that stopped trace is acting as Flag and it traces to another Barrier and so on...

Sample table

But this will probable will take too much time to execute. I'm interested if someone has a different view of this problem.

eg

2

In your image you have shown a non-branching scenario, a bunch of lines that you need to determine the sequence from your starting flag. Here is a solution that does not even necessarily use a geometric network.

  1. Select all your segments, maybe you might use a network trace to do that, or you could do it manually.
  2. Extract the centroids of each segment and make sure they have the segment ID
  3. Dissolve your segments into a single polyline
  4. Measure the distance of centroid along this line, you could the python method measureOnLine() on the polyline.
  5. The sorted distance is your numeric sequence.

There is one flaw with my suggestion and that is you are using such an old version of ArcMap that the online help does not go back to that version as esri have stopped supporting it years ago so I don't know if measureOnLine() exists as a method on a polyline for 10.2? You might need to update your version if you want to explore this approach

2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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