Skip To Content

Creating and using layer selections

Layers and table views provide useful reference shortcuts to feature or tabular data on disk, but more important benefits are realized when they're used in conjunction with selection tools: Select Layer By Attribute and Select Layer By Location.

The Select Layer By Attribute tool selects features based on attribute values, while the Select Layer By Location tool selects features based on their relationship to other features (within the same or in another feature class).

When the layer (as opposed to the path to the feature class or table) is used as input, only the selected features will be used. For example, if Select Layer By Attribute is run on a layer named World Countries, you devise a selection with COUNTRY_NAME is Equal to Canada. The layer is used as input to Summary Statistics to sum the values in the POPULATION field, only one feature will be used (Canada), and the result will be a value of 35 million. However, if the path to the feature class (for example, C:\mydata.gdb\world_countries) is used instead of the layer name, all 195 features will be used, and the result will be 7.1 billion.

The Copy Features tool can be used to make a permanent copy of the selection to a new feature class or table.

Multiple spatial and attribute selections can be combined using the add to and remove from options on the Select Layer By Attribute and Select Layer By Location tool dialog boxes.

Layers and table views and selections can also be used within Python and models. To do so, use the Make Feature Layer and Make Table View tools to create the layers, or view and perform selections on the layers, and use the layers as input to other tools.