Section Four: Selecting Data in ArcMap - The Basics of Making Selections

Probably the most common thing done in GIS is locating and isolating features (shapes to represent real world features and the attributes which accompany them) which match a specific search criteria to help us answer spatial questions. In GIS, we often have vector data with attributes tables which contain more attributes or features then we need at one time. To pick out only the features we are interested in at that moment, we use three separate but related selection processes: Select by Attribute which uses the values, or attributes, of features to make a selection in the attribute table (or other non-spatial data table), Select by Location which uses spatial relationships and interactions to make a selection, regardless of attributes, and Interactive Selection, where we use a tool in ArcGIS to click on features in the map, resulting in a selection.

We say selection or selecting data in reference to both the features we see in the map and the rows found in the attribute table because that is what we are doing: picking out attributes in the table or features in the map, resulting in the rows in the table and the features in the map becoming highlighted, or selected . Notice we said "picking out attributes" and "resulting in highlighted rows", referring to the fact that we are interested in the attributes - the describing words - and the resulting action in the structure of the table is the entire row being highlighted.  There is a distinct difference between those items - the attributes tell a story of the feature while the row in a table is part of the structure.  

Like we said above, we often have too much data to work with at one time, or we might want to examine the attributes associated with a single feature, or we might want to look at the attributes of some features in one layer as they compare to features in another spatial layer.  Performing these selections - highlighting the data in the table and in the map - is the first step in reducing the number of features (map) and records (table) we are looking at and performing additional spatial analysis.  Take a moment to examine the image in Figure 5.6, noting that when a row is selected in the attribute table, the paired result is the corresponding feature is selected in the map.

Figure 5.6: Features Selected in the Attribute Table and on the Map
Zoomtoonefeature
In this screen shot, we see one record (row) selected, as noted by the (1 out of 52 selected) at the bottom of the attribute table, and the corresponding feature, Wyoming, selected on the map.  Both the feature in map (the polygon rectangle which represents Wyoming) and the row in the table are highlighted in a cyan color.  In this case, the attribute of interest is the name "Wyoming" and the row which was highlighted is randomly numbered with an ObjectID (OID) of "1".  As a paired result of querying the table (using a formatted question to ask the table to return, or select, values) for the attribute "Wyoming", the feature in the map was highlighted.  Another case where this would be the result is if the shape for Wyoming was selected by the user interacting with the map.  The intent would be to highlight (select) the shape of Wyoming, and the paired result would be highlighting (selecting) the corresponding row in the attribute table.
NOTE: Since each feature in the map has a corresponding row in the attribute table, and since when you select one, the paired result is the other becomes selected as well, the word "feature" is often used interchangeably to describe both the geometric object seen in the map and the row in the table.

In the following few pages, we will explore the methods used to select features from a layer based upon the attributes, spatial locations, or visually picking and choosing features we see on the map, but first, lets look at the fourth and final “List by...” option found in the Table of Contents - List by Selection (we looked at the first three, List by Drawing Order, List by Source, and List by Visibility in Section 4.4.2: Views and Areas of ArcMap).

5.4.2: ArcMap Table of Contents View - List By Selection

List by Selection divides the Table of Contents into three parts for this specific view:

Selected - layer(s) where at least one feature has been selected

    • In this example, we see the US_States layer has one feature selected, so one feature on the map and one corresponding row in the table are both highlighted.

Selectable - layer(s) available to have have features selected (but none are)

    • US_Cities is in an active state where features could be selected by interacting with the map or by interacting with the table

Not Selectable - layers(s) which are unavailable to have features selected

    • US_Counties is an inactive state where selections cannot be made.  We use this as a means to prevent selecting features while interacting with the map when we have a layer turned on (visible in the map) only as a context layer.
Listselect-display

Clearing Selected FeaturesClearselectionbutton-display: Being able to select features, as we have said, is very important for many tasks in ArcGIS, but knowing how to clear the selection (deselect) those features is just as important. We will find out in lab there are a few ways to clear selected features, one which clears all features in all layers with a single click of one button, and two which clear selected features in only specific layers, while leaving features in other layers selected. Both of these tasks are important at different times while working with data in ArcGIS.

5.4.3: Examining the Term “Layer”

As we’ve seen before, sometimes we use one word to mean two things in GIS, such as "feature" referring to both the geometric shape we see on the map and a row in the attribute table, or when the word “projection” is used instead of "coordinate system" to describe both geographic and projected coordinate systems. Layer is another one of those words. Sorry.

Traditionally, the word layer, in paper map analysis, literally meant layer, as in roads were drawn on one mostly transparent sheet, rivers on another, and contour lines on a third. The sheets were overlaid or layered to create a visual analysis of the intersecting features. This has led to the word “layer” meaning any spatial file added to the Table of Contents which is layered (List by Drawing Order) with others - raster, vector, feature class, shapefile, or a special kind of spatial data called a layer.

In general, when a polygon vector file is added to ArcMap, the software chooses a random color to display it with, along with a outline which is dark gray and 0.7pt1 wide.  Points show up as a squared-off, randomly selected colored circle with a black outline, while polylines show as a 0.7pt wide line of some random color.  The software attempts to jump around the color circle, maybe choosing a green one for one layer and a red for the next.  In short, it's a crap-shoot of what color the vector file will display with.

In ArcMap, a Esri layer file (.lyr) is a special kind of spatial data file used to display vector data in a user-defined way in ArcMap.  Another way to look at an Esri layer (.lyr) file is to describe it as a list of rules used to display a particular vector file.  If, in general, non-Esri layer (.lyr) vector files are added to the software as a random color, an Esri layer (.lyr) file allows you to pick and save the colors, labels, and features which show on load. For example, if you want to have a user to load a US_States layer into ArcMap not with a random color selected, but instead filled in with lime green, have a 3pt wide fuchsia outline for each state, display each state with a label, and hide Texas from the view, you would create an Esri layer (.lyr) file, saving it with these specific display rules.  Then, when the user loads the Esri layer (.lyr) file, the display will be exactly how you set it, with the desired colors, labels, and visible features.

The key thing to remember about Esri layer (.lyr) files is that the number one rule in the list of rules is the fact that the list of rules refers back to a vector file.  ALL Esri layer (.lyr) files need to be paired with a vector file about which the rules are being made.  If you would like the US_States layer to show up with a fuchsia outline, a lime green fill, the labels turned on, and Texas hidden, it can be done, as long as the first rule in the list is that the list of rules is describing how a specific vector shapefile should look.

In regards to the this class/text, the word layer will be used in the traditional sense, meaning any spatial file layered with others. If the word layer is being used to refer to an Esri layer (.lyr) file, it will be written as “layer (.lyr)” or "Esri layer (.lyr)" file.

Figure 5.7: Esri Layer (.lyr) Files are Lists of Rules to Display Vector Files
LayerLYRrulesDisplay Rules for US_States
    1. Using the US_States shapefile saved on this computer, display on load in ArcMap as;
    2. lime green fill
    3. 3pt fuchsia outline
    4. labeled states
    5. Texas is hidden from view
In this example, the Esri layer (.lyr) file has a list of rules that tell ArcGIS to display a US_States vector file with a lime green fill, a fuchsia outline, have the states labeled, and have Texas hidden. The rules describe how the vector file will look upon load, while still calling a shapefile or feature class on the computer.