Querying features

Earlier we learned how to select features using the select tool. Now, we will learn how to select features based on their properties. The Query tool in Arcview lets a user find out about features based on their attributes. If you were a real estate agent and had to find houses for clients who had specific parameters, such as the number of bedrooms or type of house, you could use a map of available lots and query the theme based on these attributes. The appropriate houses would be selected.

Hiding features:

Using the query tool, we can also influence the way data is presented. Suppose you had to present data based on only selected attributes and you had data which included the selected attributes as well as other information that is not relevant for this presentation, you can use the query tool to hide the non-relevant features for that presentation.

The query tool is a very powerful tool because it eliminates a lot of needless searching.

Exercise: Selecting using queries

Using the query builder, we will try to find out which dams in the Jefferson county area are hazardous to the Cahaba river watershed.
  1. If the dams or the watershed are colored in a yellow shade, they will be hard to see when they are selected. If necessary, change the dams and the watershed to a different color as in the previous exercise.
  2. Activate the Dam theme and click on the button titled Query Builder. Scroll down the Fields menu and double click on Hazard. Click on the = sign and then double click on SIGNIFICANT in the Values box. Click on and , scroll down the Fields menu and double click on County. Click on the = sign and double click on Jefferson in the Values field.
  3. The query string should look like this:

    (([Hazard] = "SIGNIFICANT") and ([County] = "Jefferson"))

  4. Click on New Set. Exit from the query builder by clicking on the 'X' at the upper right hand corner of the query dialog box.You will see the dams that match these criteria highlighted in yellow in the view. Open the theme table for Dam.shp. You can see the number of dams that matched the criteria under the first row of the buttons.
  5. Click on the Promote button next to the Query Builder. This button brings all the records(dams) that were selected to the top of the table. You can see all the values of the attributes of the dams selected by scrolling to the right.
  6. Close the attributes table and click the Clear Selected Features button.
Using the Query Builder, you could determine the number, names, manufacturer and use of dams. You can also find out other technical information pertaining to the dams. These dams, located in Jefferson county pose a significant hazard to the Cahaba River watershed.

Exercise: Hide using queries

As mentioned before, suppose there was a theme which contained general data and you wanted to present something specific. One way to do it is to present features based only on certain criteria. For example, you have a theme which shows all the dams in the Cahaba watershed; but for a presentation you only want to show the dams that supply water. Queries can help do that.

Suppose you wanted to show dams that were used for supplying water. In the Dam theme, there are dams for all kinds of uses including water supply. Dams not used for water supply can be hidden from view.

  1. Go to the Theme menu and select properties. The icon Definition should be highlighted. If not, do so now. On the right hand side, there should be a text box titled Definition. Next to the textbox is a Query Builder button. The button has a hammer on it. Click on it.
  2. Scroll down the Fields menu and double click on Prm_purpos. Click = and then double click on Water Supply in the Values section. Click on OK.
  3. Click on OK again and you will see a lot fewer dams. These dams are meant only for water supply. Open the theme table and you will see the values of all the attributes pertaining to these dams.
You can hide non-relevant features to present information with which you are concerned. So if you are interested only in dams whose primary purpose is water supply in one area, you can present that information.

Do not save any changes and exit out of Arcview. We will now continue on to BASINS which uses some of Arcview's tools for watersheds.


Home | Back | BASINS