Select to view content in your preferred language

Need help selecting from a feature layer

498
2
04-20-2023 11:00 AM
moonbina
New Contributor

I have a feature layer called A, I created two layers b and c from A using "select by attribute" so b and c has polygons that are in A. Now I want to create another layer d that is the remaining polygons from A.

For instance, A has 100 polygons, I create b which is a subset of 20 polygons from A, I do the same for c which is a subset of 30 polygons from A. Now I want to create d which should contain the remaining 50 polygons in A. What tools can I use in Arcgis pro for this?

0 Kudos
2 Replies
JesseWickizer
Esri Contributor

Use Select by Attributes on layer A again:

  1. Add the query used to select the 'b' features to create a new selection.
  2. Next, keeping those features selected, change Selection Type to Add to the current selection, and add the query that selects the 'c' features. At this point all the b and c features are selected.JesseWickizer_0-1682018304160.png
  3. Finally, change Selection Type to Switch the current selection which will select all the features that do not match query for b and c features. Export the selected features to a new 'd' layer. JesseWickizer_1-1682018324697.png

 

0 Kudos
DavidPike
MVP Notable Contributor

Probably the most foolproof method is to repeat the select by attribute queries and then switch the selection when all of 'B, C' are selected - this will then select the remainder which are not 'B, C' types.

https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/select-layer-by-attribute.ht... - for the first query, use NEW_SELECTION.  For subsequent queries use ADD_TO_SELECTION. 

When all the features are selected you then switch/reverse/invert the selection 

 

-- 'B' type query example
Animal = 'Dog'

-- 'C' type query example
Animal = 'Cat'

-- Select all remaining example
Animal <> 'Dog' AND Animal <> ' Cat'

--another way:
Animal NOT IN ('Cat', 'Dog')

 

0 Kudos