Friday, April 3, 2015

Lab 4

Multiple Criteria Queries
Lab #4
Andrew Evenson
4/3/15
 
 
Introduction: The goal of this lab was to utilize queries and Boolean expressions, which we have been covering in class, and then adding on the concept of multiple criteria queries. Learning this skill is very useful for selecting features with minimal amount of work/steps and Boolean expressions, making us more efficient queries. Then to build on the multiple criteria aspect we worked with spatial and attribute queries during this process, as well as mapping the results of the queries we performed onto maps that already had other data.
 
Methods/Results: The first query involved finding counties with a specific population range and population density per square mile (Figure 1). To do this I first set up the population ranges with the 'AND' expression (to make the results only from that range), and then added the population density with the 'OR' expression.
 


Figure 1: A query box showing the SQL and Boolean expressions used for the multiple criteria query.
 



Then after the query results appeared a layer was created from the selected features from the counties shapefile, after which the answers were obtained from the resulting tables, resulting in the first map (Figure 2)

Figure 2: A map of the United States depicting the counties that met the multiple criteria query.



The second query dealt with selecting multiple states and characteristics based upon them (Figure 3). Which required the use of 'IN' as the operator, then adding the 'AND' operator to finish up the rest of the query.

Figure 3: Query window showing the necessary language to extract the desired information.



After which, I repeated the same steps as the first query of creating a layer from the selected features, resulting in a map of the desired attributes. (Figure 4).
Figure 4: Map of the United States with counties highlighted that matched the multiple criteria query.
The third query was and addendum to the query for question 2, which added in 5 states. This was achieved by taking the original expression from question 2 and adding the 'OR' expression to include the new states and criteria for the query (Figure 5).
Figure 5: Added criteria from the previous query.
After, when creating another new layer, the number of  counties that fulfill the new criteria can be acquired; and a new map of the new results (Figure 6).
Figure 6: Map of the United States showing the additional counties that met the new criteria, which was built on from the previous question.
The fourth query involved the combination of spatial and attribute queries. First to get the correct cities that are within 2 miles of a lake I had to perform a spatial query, setting cities as the target layer. After which the attribute query can be performed to get the final results (Figure 7).
Figure 7: Attribute query performed after the spatial query for question #4.
 After the query was performed a map was again created using the same techniques as described in the prior queries (Figure 8).
Figure 8: Map showing cities that are within 2 miles of a lake.
 
The final query was finding rivers that matched certain criteria (names) to do this the same 'IN' expression was used (Figure 9), just like previous questions dealing with multiple states, after which a map was created showing the rivers that matched the criteria (Figure 10).
Figure 9: SQL of the multiple criteria query.
Figure 10: Map of the multiple criteria results.
 

 
Conclusion: This lab helped employ queries, specifically multiple criteria queries, in an efficient manner for further use, as well the combination of using attribute and spatial queries together to obtain the desired selected features of the data.



Sources
1. Mastering ArcGIS (2014) [Book]. Price, Maribeth. McGraw Hill, New York, NY.
2.  ArcMap 10.2.2.(2014) [Software]. ESRI Inc., Redlands, CA. [accessed 4/2/2015].

No comments:

Post a Comment