Select to view content in your preferred language

Automatic tracing from multiple start points, exporting the results as json

928
15
Jump to solution
04-19-2024 01:20 AM
JohnGoat
New Contributor II

Hi all,

I have 150 Low Voltage Service points for which I have TracePoints1 printed in the General Notes area. At these points, I want to produce separate json by doing upstream traces for each of them. After throwing a flag at each of these starting points one by one, it will produce json, then the first flag will be cleared, it will move to the next point, throw a flag there and produce json. The process will repeat this way for 150 starting points. How can I do that?

I want to get the AssetID parameters of the circuit breakers by generating json from 150 starting points.

I want to make a process automation for these processes from the points I marked on the map. How can I do these things with Python?

PS:

  • For now I'm working on Mobile gdb
  • ArcGIS Pro 3.1.4
  • UN 6
0 Kudos
1 Solution

Accepted Solutions
JohnAlsup
Esri Contributor

This toolbox https://github.com/Esri/Utility-Data-Management-Support-Tools contains a tool called batchtrace.  It can do what you are describing.

https://esri.github.io/Utility-Data-Management-Support-Tools/docs/3.0/BatchTrace.html

 

John Alsup
jalsup@esri.com

View solution in original post

0 Kudos
15 Replies
JohnAlsup
Esri Contributor

This toolbox https://github.com/Esri/Utility-Data-Management-Support-Tools contains a tool called batchtrace.  It can do what you are describing.

https://esri.github.io/Utility-Data-Management-Support-Tools/docs/3.0/BatchTrace.html

 

John Alsup
jalsup@esri.com
0 Kudos
JohnGoat
New Contributor II

Thank you @JohnAlsup 
I reviewed the toolkit but I'm getting errors, is there a source showing how it works? 

 

BatchTrace.jpg

0 Kudos
MikeMillerGIS
Esri Frequent Contributor

Can you try the version here? https://github.com/Esri/Utility-Data-Management-Support-Tools/tree/Preview3.1.2

Make sure to remove the old toolbox(best to delete it) and restart pro.  If that does not work, I can pull the 3.1 code and look at a fix for that issue

0 Kudos
JohnGoat
New Contributor II

You are right @MikeMillerGIS,

I ran the updated version and I don't get any errors. But this time I see that you have bypassed many of my starting points. I get a "No valid starting locations found" notification. When I examined the data, I could not see any problems at the starting points.


I used the parameter (notes = 'Trace1') for the starting point. I want to trace 2999 points, but as a result I get 310 output.

 

JohnGoat_0-1716447647702.png

 

0 Kudos
MikeMillerGIS
Esri Frequent Contributor

Do you have different tiers in your data?  What tier is your downstream trace set up for?  You might need a different trace config per tier/per junction.  You would need a field on the junction class with the trace config name and the code can pull the trace config from that field

0 Kudos
JohnGoat
New Contributor II

 

Hi @MikeMillerGIS 

There are no different tiers, I am trying to trace within the same tier. Each tracking starting point is within the same tier.

In the screenshot, starting points 317009 and 317010 are in the same tier. It gives error 317010, I do not get any errors when I trace on the map. There are many examples like this, why can't it find the starting point?

 

JohnGoat_0-1716464705240.png

 

0 Kudos
MikeMillerGIS
Esri Frequent Contributor
I am not sure then. I just ran through my junctions and they worked. If you manually set a trace point at that junction and use the same trace config in the gp trace, does it work?

0 Kudos
JohnGoat
New Contributor II

Yes, when I trace with the GP tool, I do not get an error at the same point. I don't understand this anyway

 

JohnGoat_1-1716467044311.png

 

 

0 Kudos
MikeMillerGIS
Esri Frequent Contributor
If you put a SQL query on batch trace for that one row, does it work? What if you put default terminal Id to 1?

Does your junction layer have a field called terminalid or featureglobalid?

If you pass in the starting point layer that you used to test the trace(in default database) to batch trace, does it work?

For tracing junctions, the required fields are featureglobalid(if does not exist, batch trace looks for globalid) and terminal Id.
0 Kudos