After reading through various documentation and searching the Community board, I have yet to find a summary that thoroughly explains - with full examples - what's possible for bulk tracing a UN.
I'm on Enterprise 11.3, UN version 7, Pro 3.3.3.
My goal is to use either Python API or ArcPy for the following:
While looping through each of our water UN's ~77,000 line features...
Benefits of this approach:
What works, what doesn't, where I lack knowledge:
Before going into specifics, my frustration is centered around the fact that it's hard to find a method that allows me to dynamically define my starting point (as a mid-point of each water main) for each iteration and then retrieve results in memory...preferably while running against a no dirty area version that is free from interruptions.
In ArcPy I cannot seem to reference a version other than SDE.Default. I've tried appending syntax like this "?gdbversion=MyUser@Domain.TraceTesting" (both with and without forward slash before the "?") to the URL for the UN layer, but it doesn't seem to take.
TraceLocations = [{
"traceLocationType": "startingPoint",
"globalId": GlobalID, ## example: "{288D22C3-301A-44D1-81BA-E66F094413D9}"
}]
traceConfiguration = {
"includeContainers": True,
"includeContent": False,
"includeStructures": False,
"includeBarriers": True,
...etc.
}
resultTypes=[{"type":"elements","includeGeometry":False,"includePropagatedValues":False,"networkAttributeNames":[],"diagramTemplateName":"",
"resultTypeFields":[]}]
trace_results = UtilNetMgr.trace(locations=TraceLocations, trace_type="isolation", configuration=traceConfiguration, result_types=resultTypes)
It's supposed to produce a dictionary with {"traceResults": {"elements": list,}"success": bool}
Here's how it looks when my trace completes. With all the variations I've tried, I never see "traceResults" or "elements" returned.
---------------
Here's my strategy to be most efficient: Instead of having to trace all 77,000 features, what I'll actually trace will be much less - perhaps as little as 1/10 of this total. For each line traced, I'm capturing all the lines being isolated from that run. Therefore, I already know that full group of lines is covered by a certain combination of barriers (valves). So I can then insert all those rows into my SQL table before moving on to a new isolation area, if that makes sense. I really just need to trace one line segment for each isolation area/group. It could entail 2 lines total or it could entail 18 lines, but it cuts down on a lot of processing.
Solved! Go to Solution.
@Andy_Morgan You can mitigate the risks of pressure zone boundaries breaking if you have editors work in a version, instead of defaulting directly, and ensure they validate all their dirty areas, fix all their edits, and trace or update their subnetworks before posting their versions. This will flag any inconsistent subnetworks before they are posted to default and become everyone's problem.
Right, definitely an important workflow for editors. While that's applicable for typical edits to lines and valves, sometimes a pressure plane expansion could mean a slow motion updating of features as the construction project and engineering discussions go on for weeks or months. In such rare cases where a broken boundary in GIS is going to be intentional (and of course temporary), I suppose we could create a no-edit/static version on the side before breaking the boundaries -- a snapshot while the pressure planes are still sealed -- and use it for re-tracing if an updated bulk trace was needed.
Hopefully there wouldn't be a need to run an isolation trace for that small expansion/modification area under construction, but otherwise for everywhere else at least this once again shows the value of having a pre-traced system that you don't have to worry about the Default version having issues at any given moment.
@RobertKrisher and @MikeMillerGIS:
One last question as it relates to my bulk tracing solution.
I made some good progress but now hit a wall. For roughly 70,000 water main features, it may take around 24 - 36 hours to trace everything and store ObjectIDs of all the isolated lines. However, I also need isolating valves. I cannot find any way to perform a single trace and extract the valves that are actually isolating + the full set of water mains being isolated.
Here's the reason I want both sets. Besides knowing which valves to turn off in case of an emergency, having all isolated lines will allow me to essentially trace one more level out, i.e. a "double isolation trace". This is nice to offer the field crews for critical situations like a busted 24" main. Having the second layer of isolating valves will potentially save the crews time if they cannot shut of water based on the immediate (1st level) of valves to close. So rather than run a bunch of isolation traces from all the results of the first initial trace, I could use the database row to quickly and easily return isolating valves for those secondary lines.
Here's a visual that may help to explain. My starting trace point is the green point in the middle. The valve on the south end is the only isolating valve. The other two circled in red are what I wish to exclude...yet include all those isolated line elements that are selected in the map.
Is it possible to capture this combination in one run, or am I forced to trace the entire system twice if I want to be able to select double isolation valves directly from my database table of pre-traced lines?
The two valves circled above should not be included in my results.
Update after posting
It looks like this question has already been answered:
Is there any way to take advantage of a Connected trace or some other type of faster trace than a second Isolation? That's the main concern, avoiding two isolation traces for the same feature.
Two isolation traces are the only way that I know how to achieve this.