REST API Trace connectivity result

724
8
Jump to solution
04-27-2020 05:26 AM
mrasiukevicius
Esri Contributor

UN REST API trace documentation [Trace—ArcGIS REST API: Services Directory | ArcGIS for Developers ] has a JSON Response sample that contains URL object:

{
   ...
   "url" : "<url>",              // url of created connectivity file
   ...
}

I quess this key should return a reference to trace result elements connectivity information. Is it possible to get element connectivity information as a UN trace result:

- using REST API ?

- using ArcGIS Pro SDK ?

- using Enterprise SDK ?

1 Solution

Accepted Solutions
RichRuh
Esri Regular Contributor

Hi,

I've been talking to Renato and other Esri staff offline, and wanted to add some information.

1. As you know, we do not provide access to the fine-grained network topology on the client.  We've developed a detailed and flexible set of tracing configuration options to address the most common workflows, but we're no under no illusions that we've got them all covered.

2. You can use the Export Subnetwork geoprocessing tool to return the network connectivity for a subnetwork.  Depending on the workflows you are trying to accomplish, this might help.

3. Our documentation hints that this capability is available with Trace.  As Renato pointed out, this hasn't been implemented yet.  In the short term we're in the process of removing this from the doc, but it remains on our long-term roadmap.

4. Starting with ArcGIS Enterprise 10.8.1, the Enterprise SDK will allow access to utility network topology in a Server Object Extension (SOE).  You'll also need a way to call this SOE, either via directly calling a REST endpoint, or by writing a Server Object Interceptor (SOI).

I hope this helps some.

--Rich

P.S. If you have more specific information about the business cases you are trying to solve we can investigate whether we could add the necessary options to our core product.  

Here are some ideas for the cases you described above.

* You should be able to use the Nearest Neighbor filter to return the two nearest devices of a particular type.  (You might need a second trace to find the nearest device so that you know the order of the devices.)

* You might be able to use Functions to find voltage drop along a downstream path

View solution in original post

8 Replies
RenatoSalvaleon3
Esri Contributor

Quick answer:

The option described in the REST help has not yet been implemented.  
- using REST API ?  Yes, with  Export Subnetwork

- using ArcGIS Pro SDK ? Yes, specifically the UN API

- using Enterprise SDK ? No

You may also find these blogs helpful with additional details and references.

Export Subnetwork blog

Trace blog

0 Kudos
mrasiukevicius
Esri Contributor

- using REST API: how it is possible to get "url of created connectivity file" from UtilityNetworkServer/trace if using traceType = connected?

0 Kudos
RenatoSalvaleon3
Esri Contributor

The reference to our REST API doc threw me off the intended question but it's good you discovered an oversight in our help doc. Per our developer, the URL of connectivity file refers to a JSON object not yet implemented in Trace results. 


Back to your question, are you actually interested in the JSON output of the trace result using traceType=connected or something else?

0 Kudos
mrasiukevicius
Esri Contributor

My initial question basically related to our migration from GN to UN. We have number of implementations in Desktop or SOE where we are using tracing tasks like: "FIND SECOND junction downstream from gas regulator IF FIRST junction is of type ...", or calculating voltage drops from transformer to line ends as we pass particular element types, etc.

As I understand UN does not have possibility to traverse network like ArcObjects have directly from DB. So I have found this JSON response sample expecting to get such information about UN Elements connectivity.

Also looked at ArcGIS Pro SDK, but also didn't find how can I solve such tasks as trace returns just list of elements without connectivity info:

IReadOnlyList<Result> traceResults = downstreamTracer.Trace(traceArgument);

Especially would be nice to find UN analysis solution when implementig ArcGIS Server SOE and GP services.

0 Kudos
RichRuh
Esri Regular Contributor

Hi,

I've been talking to Renato and other Esri staff offline, and wanted to add some information.

1. As you know, we do not provide access to the fine-grained network topology on the client.  We've developed a detailed and flexible set of tracing configuration options to address the most common workflows, but we're no under no illusions that we've got them all covered.

2. You can use the Export Subnetwork geoprocessing tool to return the network connectivity for a subnetwork.  Depending on the workflows you are trying to accomplish, this might help.

3. Our documentation hints that this capability is available with Trace.  As Renato pointed out, this hasn't been implemented yet.  In the short term we're in the process of removing this from the doc, but it remains on our long-term roadmap.

4. Starting with ArcGIS Enterprise 10.8.1, the Enterprise SDK will allow access to utility network topology in a Server Object Extension (SOE).  You'll also need a way to call this SOE, either via directly calling a REST endpoint, or by writing a Server Object Interceptor (SOI).

I hope this helps some.

--Rich

P.S. If you have more specific information about the business cases you are trying to solve we can investigate whether we could add the necessary options to our core product.  

Here are some ideas for the cases you described above.

* You should be able to use the Nearest Neighbor filter to return the two nearest devices of a particular type.  (You might need a second trace to find the nearest device so that you know the order of the devices.)

* You might be able to use Functions to find voltage drop along a downstream path

mrasiukevicius
Esri Contributor

P.S. If you have more specific information about the business cases you are trying to solve we can investigate whether we could add the necessary options to our core product.  

Just started digging deeper into UN tracing. As example such tasks like:

- "Connected" task with "Filter by N nearest"

or

- "Shortest path" between 2 points

Response returns random element list. Would be nice feature to have them ordered by nearest distance, or by list along path from 1st flag to 2nd.

0 Kudos
LoganSuhr_PSE
New Contributor III

@RenatoSalvaleon3and @RichRuh , has there been any new development on this topic and specifically around the most recent comment about ordered results?  An ordered list from the up/downstream trace result is a key component in understanding parent to child relationships and is used by many systems in a utility.  I'd really like to know more about the current state and what options I have.

0 Kudos
RichRuh
Esri Regular Contributor

Hi Logan,

The Trace geoprocessing tool now has an option to return connectivity as JSON. You will have to parse the JSON yourself.   The Pro SDK does not yet support this option, although you can always call the tool using the geoprocessing API. Our goal when we do support it is to return an object structure, not unformatted JSON.

As for ordering, I've not heard of any options there, but I can pass it on to the utility network team.

--Rich

0 Kudos