Select to view content in your preferred language

ArcGIS Pro 3.0.2: How to select the “polygon” output from the “network analyst layer” while working in the model builder?

1336
14
04-09-2024 12:18 AM
JamalNUMAN
Legendary Contributor

 

ArcGIS Pro 3.0.2: How to select the “polygon” output from the “network analyst layer” while working in the model builder?

 

In the screenshot below, I couldn’t figure out how to select the “polygon” output from the “network analyst layer” while working in the model builder.

 

The command “select” requires the creation of the “network analyst layer” first in order to get the “polygon” output selected.

 

How this might be performed?

 

Clip_1020.jpg

----------------------------------------
Jamal Numan
Geomolg Geoportal for Spatial Information
Ramallah, West Bank, Palestine
0 Kudos
14 Replies
DanPatterson
MVP Esteemed Contributor
JamalNUMAN
Legendary Contributor

What I intended here is to be able to select the “polygon” output from the “solve” tool before running the model. The “select” tool can be connected with an output based on the “precondition” basis. In my case, I need to select the “polygon” well in advance!

 

Clip_1024.jpg

----------------------------------------
Jamal Numan
Geomolg Geoportal for Spatial Information
Ramallah, West Bank, Palestine
0 Kudos
Dale_Honeycutt
Frequent Contributor

Use the Select Data tool found in modelbuilder's Utilities menu:

Dale_Honeycutt_0-1712680659605.png

The Input Data Element is the output of solve.  The output of Select Data is a layer.

Dale_Honeycutt_1-1712680718973.png

PS: I'm looking to see if this is documented anywhere and so far I'm not seeing anything.  In my mind, it should be well documented. Perhaps a Usage note in the tool's documentation?

JamalNUMAN
Legendary Contributor

There is a weird behavior with the “select data” tool. Despite that the “polygon” is selected as the “child data element”, the output of the layer is point.

 

What could be the issue here?

 

Both the data and model are attachedClip_1027.jpg

 

 

 

----------------------------------------
Jamal Numan
Geomolg Geoportal for Spatial Information
Ramallah, West Bank, Palestine
0 Kudos
Dale_Honeycutt
Frequent Contributor

I just reran my test case and yes, I'm seeing this as well. I use Copy Features to copy the polygons to a geodatabase and it shows that the copied feature class has point features, but when I add this feature class to the map, it draws as polygons and the attribute table says it's polygons !??!

Let me investigate further - this is just weird.  It seems to depend on whether I run the model from the beginning or step-by-step (?)

Sorry for this -- it worked in my initial test case.  

JamalNUMAN
Legendary Contributor

To verify that the output of the "select data" tool is not a polygon when choosing the "polygon" option for the "child data element," try performing an intersection with this polygon and a point layer overlapping the polygon. The output of the intersection is empty. (The data and model for this case are attached.)

Should this be considered a bug?

 

Clip_1029.jpg

----------------------------------------
Jamal Numan
Geomolg Geoportal for Spatial Information
Ramallah, West Bank, Palestine
0 Kudos
Dale_Honeycutt
Frequent Contributor

Jamal: 

I had a few minutes to recheck my model and data and now I can't reproduce this.  But I *know* I saw it -- the output as point instead of polygon.  I may have some time tomorrow to look at your data and models.  I'm working on the assumption that this is a data element refresh issue.  In the meantime, I suggest

  1. you Validate your model and
  2. you add 'Copy Features' to your model, copying the output of Select Data to a new feature class and use that feature class for subsequent processes. Copying features to a new feature class creates a fresh new data element.
JamalNUMAN
Legendary Contributor

Right. Now the “select data” tool works as expected, as if it has never had any issues! I'm not sure why it used to produce points while now it produces polygons (which is correct)

 

Clip_1034.jpg

----------------------------------------
Jamal Numan
Geomolg Geoportal for Spatial Information
Ramallah, West Bank, Palestine
0 Kudos
Dale_Honeycutt
Frequent Contributor

That's great news! (I downloaded your zip & tried opening/repairing your projects but was unsuccessful).

I work a lot with Vehicle Routing Problem layers and I can say working directly with the sublayers seems to create issues, I think because the VRP layer adds extra metadata to them.  I always copy them out to new feature classes and work with those.  

But, like you, I know I saw the service area as a point feature class, but I'm unable to reproduce now.  

Let's hope it keeps working for you!