In the previous lab, we learned where to acquire data and how to perform a standardized quality assurance and quality control procedure. Now that we have the data, we will prepare it for analysis by projecting the data into the same projection and coordinate system. Once this is done, we will narrow down our choice of music festival locations using attribute selection methods and overlay operations. Our goal is to identify a festival site that is categorized as "Rural Residential", zoned as "U" or "unclassified", has a good access to roads and cell signal, but not encroaching on rivers or wetlands, and large enough for a good-sized crowd.
A flowchart is an easy-to-understand diagram that gives you the gist of the project in a single glance. This is a very good way of communicating and documenting your project quick and clear, so that the analysis will more likely be understood and applied correctly and consistently. By focusing on the detail of an individual step, identifying the input(s), analysis tool(s), and output(s) and how the elements are linked to one another, you also benefit from the process of creating a flow chart itself. Below is a flowchart summarizing our project to achieve the goal mentioned above.
It is important that each layer in any analysis you perform have the same spatial reference system. This will minimize uncertainty and error. Any error related to map projections will at least be uniform throughout the analysis if they all share the same spatial reference system.
In this step we will project each of our data sets into NAD83 UTM Zone 10 North. If you will recall from GSP 101, this is an international coordinate system based on the Transverse Mercator projection. It is particularly accurate for regions with a North/South orientation, such as Humboldt County. UTM always uses meters as the linear unit.
This first layer is already in the spatial reference system we want to use, NAD83 UTM Zone10N. However, we should check to be sure.
Next, we will add the remaining shapefiles one at a time. You may ignore any "Geographic Coordinate Systems Warning" that may pop-up.
We have now loaded each one of the six shapefiles. It is now time to use the "Project" tool to create copies of these files in the spatial reference system that we want, NAD83 UTM Zone 10 North. We could use the "Project" tool to create a copy of the shapefiles in the new spatial reference system one at a time. However, there is a script tool called "Batch Project" which allows us to load multiple files and project them all at once. It iterates though the list of loaded files and runs the "Project" tool for each one. To save time, we will use "Batch Project".
Remember, the rivers layer is already in the projection we want. We don't need to project this shapefile.
Some of the files are rather large. It may take a few minutes to project them all. Please be patient.
Once the batch project tool is complete, you should see a copy of each of these layers in your "Working" folder.
Now that we have our shapefiles in the correct projection, we will do the same for our raster data. You will find that most tools require a separate set for raster and vector data. In this case we will use the "Project Raster" tool.
Before we start, lets be sure that our map data frame, labeled "Layers" in the Table of Contents is in the correct spatial reference system.
In this next step we will add the cell tower data, which is in the form of a tab delimited text file. We will add this file as "X Y data" and Define the projection as we add it it. The result will be a temporary "events" layer that we will have to export as a shapefile.
As you can see, the data is quite simple. It is in a "tab delimited format", which means that it is in a table where each column is separated by a tab. The column headers are "Loc_No", "City", "Latitude", and "Longitude". It is the last two columns, Latitude and Longitude, that are necessary to place this information on a map. This is the "X Y" component of the data.
When the file is added, the Table of Contents changes. Instead of being in the "List by Drawing Order" mode, it changes to the "List by Source" mode. It is easy to miss if you are not watching carefully. It does this because tabular data is not "drawn" on the map. This file will not show up in the Table of Contents when in "List by Drawing Order" mode. For now, we need to keep it in "List by Source".
Note: You must change it back to "List by Drawing Order" if you want to be able to change layer visibility by dragging the layers up and down in the Table of Contents. For now, leave it as it is.
The display XY Data window is now open. The X field and the Y field are detected automatically. This is Longitude and Latitude respectively. However, ArcMap will try to define the projection using the same spatial reference system as the map data frame. This is most often the incorrect definition. The correct way to define the projection is to use the same spatial reference system that the data is currently in.
In this case, the Cell Towers were created using a Geographic Coordinate System, not a Projected Coordinate System. We must define it as "GCS_WGS_1984". See the image below for clarification.
A warning appears "Table does not have object-ID field". This is warning you that though the layer may appear to be a valid vector file in the Table of Contents, it is not a shapefile. It will load as a temporary "events" layer. The ID field is a default numeric index that forces each row in the database to have a unique ID. This makes it possible perform queries and selections.
We now should have all of our layers ready and in the same coordinate system. We will start with a new blank map document (.mxd) and load only the necessary layers we are going to use in order to avoid confusion.
Within the "Parcels" shapefile, there are polygons that have been categorized as Rural Residential. These categorizes are stored in the attribute "EXLU4" in the attribute table. To only select these polygons, we must use the "Select by Attributes" tool within ArcMap. In this section, we'll show you how to use the tool and then you'll use it on your own in the next section.
We can now export the current selection as a new dataset. In other words, we will subset the data to create a layer with only those records that we are interested in.
The next section will have you select the areas of Humboldt County that are zoned as "U" or "unclassified".
By using the Intersect tool on the Zoning and Parcels selection layers, you are producing a shapefile that contains an Attribute Table that has all instances where a polygon is both 'U' and 'Rural Residential.'
An Intersect generates a shapefile with a "geometric intersection" of the input features. All overlapping features are combined, while non-overalapping features are eliminated. See the graphic below.
This will create a new layer, "RuralU" that contains only features that are rural residential and zoned as "U".
We no longer need our selection layers, the parcel layer, or the zone layer. All we need is our new "RuralU" layer. To keep things organized, remove them from the Table of Contents.
Next, we want to select all the areas that overlap with a road.
Our Final Parcel cannot intersect with any rivers or water bodies, so the following steps will produce a selection of all areas in our "ruralU selection" layer that do not overlap with the National Hydrology Database (NHD) and the Wetlands data.
If you will recall, the rivers shapefile was already in the spatial reference system NAD 83 UTM Zone 10 North, so it is still located in our originals folder.
Switch Selection deselects all attributes currently selected and selects the remaining attributes that were not selected from the original query.
To work with the wetland data, we'll need to clip the wetlands just to Humboldt County, then buffer the area around the wetlands, and then erase the remaining area from our current layer.
The wetlands shapefile is large so this operation may take a while. Please be patient.
We will utilize the Buffer tool to place our Music Festival 600 meters from any wetlands within Humboldt County.
This operation may also take a while, possibly 5 to 10 minutes. Please be patient. You may want to take this time to get up and stretch, get a drink of water, or walk around for a bit.
In this next step we will use our "WetlandsBuffer" to erase. This tool is fairly straight forward, in that it will erase all of the area covered by the wetlandBuffer from RiverParcels.
The Erase tool is not located in the Geoprocessing menu. We will have to search for it.
We have met most of our criteria so far, however we want to weed out very small parcels and sliver polygons left over from our erase operation.
However, whenever you perform an overlay operation like "clip", "intersect", or "erase", the area values recorded in the attribute table are not automatically updated. They still have the original values, which are now incorrect. In order to determine which areas to keep, we will need to update the "Area" field by using Calculating Geometry.
Now that we know the square meters in the Area field are updated, we want to select parcels with an area greater than seventy thousand (70000) square meters.
Our music festival will require a stable signal from a cell tower. In this scenario we have been given data on the range of certain cell towers. For the next series of steps, we will be creating buffers based on these different ranges. We will need to create a field within the attribute table of our cell towers to hold these buffer distance values. We will do this by selecting the appropriate cell tower locations and using the Field Calculator to assign values to selected records.
The table below shows the buffer values that need to be assigned to each cell tower. These buffers represent the stable signal range of those towers.
Towers ("LOC_NO") | Buffer |
---|---|
7-8,21,25 | 400 |
5-6,9-12,14,18,22,26-27 | 1000 |
1-3,15,17,19-20,23 | 5500 |
4,13,16,24 | 8000 |
In the next series of steps we will use Select by Attributes to select a range of cell towers. Once the cell towers are selected, we will run the Field Calculator. This tool will only update the records (rows) that are selected (highlighted) by our Select by Attributes.
Lets start with the first row. We will select cell towers with a location number of 7,8,21, and 25.
("LOC_NO" >= 7 AND "LOC_NO" <= 8) OR ("LOC_NO" = 21) OR ("LOC_NO" = 25)
Take a look at the line of text above our expression that reads "SELECT * FROM celltowers WHERE:". This is part of a Structured Query Language or "SQL" statement. Our expression completes this statement. SQL is the standard language for relational databases and is also used within ArcGIS.
Take a moment and work through the logic of the SQL query. It will select records where the value in the location number field meets the conditions of being both less than or equal to seven AND ALSO less than or equal to eight. Both conditions must be true when using the AND operator. The numbers 7 and 8 meet both these conditions, so both records will be selected.
Now an OR is added afterwards. This means that if it does not meet the first condition, it may also be selected if the location number equals 21 or if the location number equals 25. Either condition can be true with an OR operator.
Note that after each Boolean Operator (AND, OR) a complete SQL statement is required. This means it must include the field name ("LOC_NO"), a comparison operator (<,>,=, <=, >=), followed by a value. If you try to take a short cut with SQL syntax and leave something out, it will not work!
Click "Apply". Now that the cell towers with a range of 400 meters are selected we can use the field calculator to enter the number 400 in each of these selected records.
Field Calculator does not use SQL. It can use VB Script or Python. Note that the code begins just above the number 400 in the image above with the words "Buffer =". The complete statement reads "Buffer = 400".
The results of the field calculator on the selected records is shown below.
As you can see the field calculator only works on selected records.
Now you can repeat the steps above until the buffer values from the table have all been applied to the celltower Attribute Table.
Towers ("LOC_NO") | Buffer |
---|---|
7-8,21,25 | 400 |
5-6,9-12,14,18,22,26-27 | 1000 |
1-3,15,17,19-20,23 | 5500 |
4,13,16,24 | 8000 |
Hint: When writing your SQL statements for the Select By Attributes window, think of the dashes on the table as "AND"s and the commas on the table as "OR"s.
In this step you will create a buffer. Instead of using a linear unit as before, we will chose to use the Buffer field in the celltower attribute table.
Before you run the buffer too you MUST clear select features. If you don't, the buffer will only work on the cell towers currently selected.
You result should be a layer composed of variable distance buffers, similar to the image below.
For the final step we will narrow down our list of potential sites by determining which parcels fall within the range of the cell towers. To do this we must perform a spatial selection to identify the parcels in the "EraseSelection" layer that are completely within a cell tower range.
The final result should be a small group of parcels that will be our potential Music Festival sites. If you had a background, it should appear as shown in the image below.
Remember to back up your data. When using the Google Drive, click the link below for a video that will show you how to make sure your data is completely backed up before you log out.