Specify Output Target Layer in WAB Network Trace widget / GP Tool

3899
8
12-02-2015 07:49 AM
RaynerHoward
New Contributor III

Greetings fellow Utilities and Web Appbuilder enthusiasts!

Was hoping someone could give me a hand with this.  I've been trying to get Web AppBuilder 1.2 (Developer) to trace my sanitary sewer geometric network upstream using the Network Trace widget (downloaded a few weeks ago from GitHub).  The first time the trace is performed, it works flawlessly.  Each successive trace however shows sanitary manholes in the middle of Africa (and not Tennessee).  Pretty sure this has to do with not having a Target Layer set up for the Output in the Network Trace Widget configuration:Clipboard01.png

As you can see, there are no choices for Target layer to choose from.  How do I set up this output target layer?  Does it need to be a hosted feature layer in AGOL or Portal for Web AppBuilder to be able to see it?

Following the procedure here:  Configure application - Utility Isolation Trace | ArcGIS for Utilities

Working with the latest Network Trace widget from here (downloaded about 2 weeks ago):  solutions-webappbuilder-widgets/NetworkTrace at master · Esri/solutions-webappbuilder-widgets · GitH...

Running 10.3.1 everywhere (Portal, Server, ArcGIS Desktop)

Not sure if coordinate systems matter, I've tried setting everything in the model to

Spatial Reference:

    • 102736  (2274)


My GP Service URL:  Task: Trace MHs Upstream

I edited the model to work with my geometric network:

Clipboard02.png

Do I also need to specify the location of the output ssManhole_Layer as an AGOL or Portal hosted feature layer?

I sure would appreciate any guidance here.  Does an output target layer even need to be specified?  Can it not just hold the features in memory until the next network trace?  Really more interested in what the results of the upstream trace looks like on the map.

0 Kudos
8 Replies
KevinHibma
Esri Regular Contributor

Simply by looking at the picture of the model, it looks correct. I would have personally used copy features at the end instead of MakeFeatureLayer....but I doubt that'd cause you any issues.

The quick test here is - consume the service back inside ArcMap. If this works correctly every time, you know the service is good and the issue is related to the WAB configuration/use of the GPService.

My guess at the issue: Its the WAB. Or the WAB you're using? Are you using a local developer version? If I take your GP Service URL and plug it into the ArcGIS Online WAB - the output from your service shows as I'd expect it to when configuring the widget. That is, the output is a points layer and I just need to set the drawing options. From your screen shot you see items like min/max scale as well as target layer.My WAB doesn't show me this. I'm not sure how or why you've got this, but to me that it seems like your configuration thinks the output of the GP Service is something else (not just a simple points layer output).

RaynerHoward
New Contributor III

Hello Kevin.

I tried your suggestion and ran the hosted GP Service - Trace Upstream tool from within ArcMap.  Sure enough, the output data (stored in memory) has a coordinate system of Web Mercator Auxiliary Sphere, units Meters.  The output layer is supposed to be TN Stateplane NAD 83 Feet.  I can see why Web AppBuilder (Developer edition by the way) might show the output trace results in Afrida, since all the other data in the web app is in Stateplane.

Why on earth would it be outputting in Web Mercator?

Task: Trace MHs Upstream

Running the model in ArcMap (not the hosted GP Service) and the output is Stateplane every time.

I'll try to replace Make Layer with Copy Features and see how that turns out.

Thanks.

Rayner

0 Kudos
ColeAndrews
Occasional Contributor III

Are all of your basemaps still in Web Mercator projection? That is the default for Web AppBuilder, and is recommended for web mapping in general.

Seems this could relate to the issue:

"Web applications assume the spatial reference of the output features are in the same spatial reference as its map instance (esri.Map). Hence, the features may not be rendered as expected.  To avoid such ambiguities, you should  set the outSpatialReference property of the geoprocessing instance to the map's spatial reference as shown in the code below."

Source: Troubleshooting geoprocessing tasks in web applications—Documentation (10.3 and 10.3.1) | ArcGIS for...

0 Kudos
RaynerHoward
New Contributor III

Not running any basemaps other than the standard ESRI basemaps.

I've tried just about everything, so I also posted this as an issue on ESRI's GitHub page:

Network Trace - Make Feature Layer vs Copy Features in GP · Issue #359 · Esri/solutions-webappbuilde...

0 Kudos
RaynerHoward
New Contributor III

Tried your suggestion and changed Make Feature Layer to Copy Features in the GP service.  This has fixed the issue of traced features showing up in Africa, but

1) it takes much longer to run

2) Barriers are now ignored.

I posted this as an issue on ESRI's GitHub page:

Network Trace - Make Feature Layer vs Copy Features in GP · Issue #359 · Esri/solutions-webappbuilde...

0 Kudos
KevinHibma
Esri Regular Contributor

Changing the output in Copy Features from something on disk to "in_memory\ManHoles" should 'make it fast again' (or comparable to before changing from MFL to CF).

As for it ignoring the barriers -- I've got no idea how/why that would happen. Your barriers are right at the start of the model. This is step happens before copy features.  Unless it has something to do with the coordinate systems still, but if that were the case I wouldnt expect your FLAGS input to work.

MikeMillerGIS
Esri Frequent Contributor

Rayner,

  If you take a look at the most recent illicit discharge trace model, you can see we resolved these issues.  The steps we took to do this are below.

MikeMillerGIS
Esri Frequent Contributor

One more note, if you are trying to use project, it will fail when there is no data, if you grab the latest Utility Isolation trace(Utility Isolation Trace | ArcGIS for Utilities), you can find how we solved that issue.

0 Kudos