Select to view content in your preferred language

ArcPro Model building, output result and de a def query on a different layer

311
6
09-23-2024 08:20 PM
DianaKing001
Emerging Contributor

I am a basic user of model builder in ArcPro and would love to be pointed into the right direction for the below example.
I have 2 layer that I am needing to work from, sub-unit layer with lots of attributes (planned start date) and the other just outline of these so doent have the dates etc

What I need to do is query a date range to get my set and then ONLY dis display the outline of the whole unit.

So from the screen shot below the sub-units in my date range are the dots, but I need to do maps with the WHOLE blue/yellow layer

DianaKing001_0-1727147718752.png

 

I tried unions, joins intersects but I still every query I did based on the date range only gave me the dot polygons.

So here is where my manual step came in, I would open the attribute table (of my model output layer) copy the numbers over and do a def query (includes the value) on the outline layer and then create my map series from that.

How do I build that into the model? ie output list , def query on different layer.
Or is there something I could change in model 

DianaKing001_1-1727147924398.png

Thanks 🙂

0 Kudos
6 Replies
DuncanHornby
MVP Notable Contributor

Not sure I fully understood your workflow. Are you saying in the image above you want to identify polygons (from the yellow layer) with a specific date but you want to display only the polygon from the blue layer that contain your yellow polygons?  Rather than doing a definition, why not select the polygons with the date and then use that selection to select the bounding blue polygon? You could then export that selection?

0 Kudos
DianaKing001
Emerging Contributor

LOL thanks for replying, yes I tend to over explain and I was sure I was going to confuse people 😊

Yes that is right, I have to query the dot layer as it has the date field (blue one doesn’t) then from the dot layer I want to take that list of numbers and display the WHOLE blue layer.

I tried doing selections (within, contains etc) but there were slivers and I ended up picking other blue polygons I didn’t want.

So I guess for the model I was asking can I take the dot layer attribute that has the number of the blue layer and do a query or selection from that blue layer?

Thanks

0 Kudos
DuncanHornby
MVP Notable Contributor

Sorry I find your description contradictory, you say ...take that list of numbers and display the WHOLE blue layer..., you then say you have tried a variety of selections but not happy with the results as it is picking up other blue polygons. But you just said you wanted the whole layer?

0 Kudos
DianaKing001
Emerging Contributor

Sorry for the confusion, no I only want the WHOLE shape of the blue polygons that have the dot layer in it.

So the dot layer is sub units of the blue layer.  Dot layer is the only one that holds the dates.
Dot Layer Attributes (Planned date, unit name)
Blue Layer Attributes (Unit name)

So I query the dot layer and find the unit names that fall in the date range and then I want to do a map series with the blue layer based on the dot layers findings.

I tried using the clips, joins, unions, and found my results were clipping the blue shape and only returning part of it (the shapes where the dot were)
When I used selection within etc, as the dot layer seemed to have slivers my results returned too many blue polygons

The only way I have found to get the result I need is take the unit name list from the dot layer and then do a def query on the blue layer using that list.  All manual.

I was hoping to be smarted and put this all into a model, but struggling.

🙂

 

0 Kudos
DuncanHornby
MVP Notable Contributor

OK now you have described you data better and what you have tried, I need to ask do you have the following scenario: 

You select your yellow polygons by a date and those selected polygons can exist in more than one blue polygon, so when you produce your map you might be showing 2 or more blue polygons?

OR 

You select your yellow polygons by a date and that selection only exists within a single blue polygon, so this case your map only ever shows 1 blue polygon, like you show in your original question?

I ask this as the index layer in a map series requires a SINGLE feature to step over but if your units are selecting by date across multiple blue polygons you can't do what you want using the GUI in ArcPro, you are going to have to script this. I don't think modelbuilder is the solution either as it has little to no interaction with a layout, you would need to control the layout using arcpy.

0 Kudos
DianaKing001
Emerging Contributor

Hi Duncan

ok, I appreciate your time spent trying to understand this.  I have another think about how I go about this.

However I do want to work out for future models if I can do a def query on a different layer from the results obtained in a say part one of a model.

Again thanks for your help.

0 Kudos