Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Spatial Analysis of Forest Landscapes: Importing and Manipulating Data in ArcGIS, Lab Reports of Forestry

Instructions for university students on how to use arcgis software for spatial analysis of forest landscapes. It covers importing data using arctoolbox, establishing a workspace connection, adding layers, manipulating layers, and accessing attribute data. Students will learn how to change layer names, adjust symbology, and use the pan tool. The document also explains how to import text files and create new fields.

Typology: Lab Reports

Pre 2010

Uploaded on 08/30/2009

koofers-user-1bq
koofers-user-1bq 🇺🇸

4

(1)

10 documents

1 / 35

Toggle sidebar

Related documents


Partial preview of the text

Download Spatial Analysis of Forest Landscapes: Importing and Manipulating Data in ArcGIS and more Lab Reports Forestry in PDF only on Docsity! Spatial Analysis of Forest Landscapes 1 Lab 1- Introduction and ArcGIS Review ArcGIS offers a graphical user interface that is similar to many Windows packages and lets people use the software without having to spend a great deal of time learning commands. The software can be a little intimidating at first since there are many options and not a lot of guidance being offered. This lab will cover a quick review of ArcGIS principles for examining spatial data. We’ll attempt to establish some basic terminology so that we can move through this lab efficiently. Some notes about the computer lab: 1. Everything that is “unofficial” and is stored on the c:\ drive of the lab machines is erased every morning. This would include anything that you save to the c:\ drive so do not save anything to the c:\ drive unless you won’t need it later. 2. Related to number 1, you should always use your network space to save lab and project work. If you sign up for an ONID account through OSU (every student has the ability to sign up for ONID without paying any additional fees), you should have a space that is automatically created for you on either the n:\ or z:\ drive. 3. You can’t install software to the lab machines. ArcGIS is a collection of three primary programs: ArcMap, ArcToolbox, and ArcCatalog. Most work in ArcGIS occurs in the ArcMap program and is saved in a map document file (*.mxd file). The GUI for each program differs in respect to the operations available. We will open both ArcMap and ArcToolbox in this exercise. We’ll use ArcToolbox to import ArcInfo export files. To access ArcToolbox, we’ll need to start ArcMap. Before we start ArcMap, let’s copy some GIS data to your user workspace. Open an Internet Browser and: 1. navigate to the course WWW site (http://www.forestry.oregonstate.edu/cof/teach/for421/ ) 2. Click on the Laboratory Databases link. 3. Click on the Lab 1 link. This should open a box that prompts you to do something with the file: 1. Click on the Save button and direct the file to your workspace location. 2. Once the file is saved, unzip the file so that all the individual files are downloaded to your lab1 folderspace. An important point about this lab notes: These lab notes assume that your data is stored under a folder that is named “lab1”- this is a good example to follow. The labnotes also show that lab1 is located under the c:\advgis\folder. You may store your lab1 folder under any location or drive for which you have write privileges. ArcMap Spatial Analysis of Forest Landscapes 2 This is the central portion of ArcGIS and is where we look at data and create maps. Start an ArcMap session by clicking on the start button on the task bar and navigating to the ArcMap executable. The sequence is start button, programs, ArcGIS, and choose the ArcMap icon. Let’s accept the invitation to start using ArcMap with a new empty map by selecting the OK button. You should see the default ArcMap program screen, similar to the graphic above, on your screen. You’ll see a row of menus, followed by a row of graphical buttons. One of the buttons will look like a red toolbox. Select this to open the ArcToolbox module into your ArcMap session. Importing Files ArcGIS will import and read ArcInfo coverages. This is important as many organizations that make spatial data available over the Internet or for purchase convert their data into ArcInfo export files. ArcInfo export files are actually single compressed files that contain many files. Export files will have a .e00 suffix attached to them. In the case of large coverages, there may be more than one export file (an additional export file would feature an .e01 suffix) but this is rare. Let’s use the ArcToolbox to import coverages produced by ArcInfo workstation software. Within the ArcToolbox window: 1. Select Coverage Tools 2. Conversion 3. To Coverage 4. Double click on Import From Interchange File Spatial Analysis of Forest Landscapes 5 1. Selecting the Import From Interchange File ArcToolbox command 2. Navigating in the resulting dialog box and select the next *.e00 file 3. Choosing the OK button 4. Closing the processing dialog box when the import is complete It is best to restrict ArcInfo coverage names to twelve characters, to avoid using numerical digits as the first character, and to not have spaces in the name. In addition, violating any of these limits in any folder or subfolder under which a coverage is stored can also lead to problems. Please remember this advice when you work with ArcInfo coverages. After successfully importing all files, remove the list of ArcToolbox commands from the ArcMap module by either clicking on the X in the upper right hand corner of the ArcToolbox or clicking on the ArcToolbox button. Map Document File A map document file (*.mxd) is the central part of ArcMap from the user perspective. You will always have a map document file whenever you start ArcMap. Map document files can be saved and allow you to pick up where you left off if you need to stop work on a project. It’s good practice, as with any other software program, to save your work often. There can only be one map document file per ArcMap session. Let’s save our current session by choosing by selecting the Save button. Save this file as lab1.mxd and store it in your c:\advgis\lab1 folder. Spatial Analysis of Forest Landscapes 6 ArcMap Again, ArcMap is probably the space within ArcGIS where you’ll spend most of your time. Use the Add Data tool to open the Add Data dialog. One thing that’s important with any new ArcMap session is to establish a workspace connection. Once we do this, most operations will try to read and write data from this location and can help us stay organized. Use the Connect to Folder button to begin this process. Use the resulting dialog box to indicate the location of your c:\advgis\lab1 folder. Choose OK when you have the folder selected. Spatial Analysis of Forest Landscapes 7 Once you’ve established a workspace connection, you should automatically see the data within the contents of the workspace. If not, use the drop down option under the Look in: prompt to select the workspace you wish to see. Spatial Analysis of Forest Landscapes 10 “Watershd polygon” is an unusual name. Change the name of the layer as it appears in the table of contents by double clicking on this layer, accessing the General tab, and typing the name “Watersheds” in the Layer Name box, and choosing OK. Also, change the name of “Owner polygon” and “Veg polygon” to “Ownership” and “Vegetation.” Also, change the names of the other tree layers so that the word “arc” is removed. Your ArcMap session should match the figure below If multiple layers exist, the order in which layers appear in the table of contents is also important. The layer on the bottom of the “stack” will be the first layer that is displayed in the view. A polygon layer that sits atop the stack may preclude all other layers from being displayed. You can move layers in the table of contents by clicking on the layer, holding the mouse button down, and dragging it up or down. For now, the only layer we can distinguish from the other layers is the outline of the state of Oregon. When you open multiple layers, ArcMap will automatically zoom to the full extent of all layers so that you are able to see all their areas. All but one of our layers are concentrated in the northern portion of the Siuslaw National Forest. The other layer Spatial Analysis of Forest Landscapes 11 contains the boundaries for Oregon. Move the Oregon layer to the bottom of the table of contents by clicking on it and dragging it below the Watersheds layer. For today’s lab, we are really only interested in the northern portion of Siuslaw National Forest, represented by the smaller “clump” of shapes in the northwestern portion of Oregon. This is our study area for this exercise. Select the zoom in tool from the Tools toolbar by clicking on it with your mouse. If you don’t have the Tools toolbar, you can access it from the View menu, choosing Toolbars, and clicking on Tools. Your cursor should change to match the above graphic. Now click and draw a box that covers the study area in your view. You can do this by clicking on the upper left hand corner of the areas and dragging to the lower right, releasing the click when you reach the lower right corner. You new map display area should look similar to the figure below. Spatial Analysis of Forest Landscapes 12 If you click on the zoom to previous extent button, you will be returned to the previous viewing perspective. Another way to zoom in is to right click on a layer of interest and choose the Zoom to Layer option. This will focus on the spatial extent the layer. Let’s use this option to zoom in on the “Watersheds” layer. Move the Watersheds layer in your table of contents so that it appears above the Ownership layer. Spatial Analysis of Forest Landscapes 15 The pan tool is very useful for moving around in your view. Click on the pan tool to activate it. Place it in the middle of your viewing area and click and drag the mouse. Notice that your viewing area moves as you move the mouse. Releasing the mouse button will place the view. Other very useful tools include the identity and label tools. We will examine each of these separately and also discuss an automatic labeling option under the layer menu. Turn off (make non-visible) the “Streams” and “Roads” layers so that we have an unobstructed view of the “Watersheds” layer. Make the identity tool active by clicking on it with your mouse. Spatial Analysis of Forest Landscapes 16 In the Identify Results box, set the Layers choice to Watersheds. Click on one of the watershed areas with the identity tool. The Identity Results box should show us the attribute variables associated with the watershed we clicked on. You can continue clicking on additional watersheds to get information about other areas. Let’s experiment with labeling. Right click on the Watersheds layer and choose the Label Features choice. The six-character abbreviated name of the watershed should be drawn on the watershed areas. ArcMap will automatically search the layer database to find a variable called “name” when you choose labeling. If ArcMap can’t find the variable it will choose another one. You can control which variable it uses by accessing the Labels tab from the layer’s properties. Let’s examine this feature. 1. Double click on the Watersheds layer 2. Choose the Labels tab Spatial Analysis of Forest Landscapes 17 3. Change the Label Field name to FULLNAME. Choose OK. This should close the input box 4. Choose OK Your map display area should look similar to the graphic below. Let’s turn off the labeling by right clicking on the Watersheds layer and clicking on the Label Features choice to unselect it. Turn off the “Watersheds” layer and make the “Ownership” layer visible. Spatial Analysis of Forest Landscapes 20 geology classes. We would select a different classification type if the variable we were interested in was numeric. You should see a listing of each unique occurrence of “Own,” four values in this case. We can adjust the way the legend is displayed in the table of contents by typing our own descriptions in the Label field. Let’s type in some more descriptive labels for our ownership classes. Follow the example in the graphic below and choose Apply to view the changes. You can also double click on one of the rectangular colored shapes that represent the values and use the color palette to change the color of each individual class if desired. When you’re finished making symbology changes, close the Layer Properties box by choosing the OK button. The symbology changes you made should reflected that areas within this portion of the forest are split among four ownership categories. Spatial Analysis of Forest Landscapes 21 Layers is not a very useful name for our data frame. Change this by double clicking on the data frame, selecting the General tab, typing “Study Area” in the Name box, and selecting open. Before we proceed, let’s do some organizing. Layers within data frames can be copied into other data frames: 1. Make both the Oregon and Watersheds layers active by clicking on one, holding the control button down, and clicking on the other 2. While continuing to hold the control key down, right click on one of the selected layers 3. Choose Copy from the popup menu 4. Go to the Insert menu and choose Data Frame- this should add a new data frame to your table of contents 5. Right click on the new data frame and choose Paste Layers Access the Properties of the new data frame and rename it “Location.” Save this map document by choosing the save button. Return to the “Study Area” data frame, right click on the Vegetation layer active, and choose copy. Return to the Insert menu and add another data frame to your Spatial Analysis of Forest Landscapes 22 session. Paste the Vegetation layer into the new data frame. Rename the new data frame to Vegetation. Your ArcGIS session should look similar to the graphic below. Open the attribute table for the Vegetation layer using one of the methods we just learned. Spatial Analysis of Forest Landscapes 25 Realize that tables can import INFO, dBase, and comma-delimited text files into a tables document. With the exception of comma-delimited text files which can’t be edited, once a data file is imported, you can edit and/or use the file for attribute data manipulations. In the case of comma-delimited files, recognize that fields in the original data file must be separated by a comma and that the first row of data is used to create variable names. Let’s use the data in this new file and join it to our existing vegetation database. You should have three tables in your session that relate to vegetation. We will be performing a one to many join. 1. Close all attribute tables 2. Right click on the Vegetation layer in your Vegetation data frame. 3. Choose the Joins and Relates option 4. Select the Join option 5. Select Type in option 1 Spatial Analysis of Forest Landscapes 26 6. Select your summary table (this should be called “Veg.txt” unless you’ve created other tables 7. Select Type in option 3 8. Choose OK 9. AFTER THE JOIN, DO NOT OPEN THE ATTRIBUTE TABLE This join is not permanent and is only stored in map document file (lab1.mxd). If the join was unsuccessful, we could undo the join by selecting the “Remove Join(s)” option from the Joins and Relates menu choice of a layer. Let’s create a permanent version of the joined vegetation data. 1. Make sure all attribute tables are closed 2. Right click on the Vegetation layer in the Vegetation data frame 3. Choose Data, then Export Data 4. Write the output to your workspace\lab1\veg_type.shp and choose OK. Spatial Analysis of Forest Landscapes 27 5. Add the new layer to your ArcMap session and rename it Vegetation Type. 6. Remove the Vegetation layer from the Vegetation data frame by right clicking on it and choosing remove. Open the attribute table for the Vegetation Type layer. There are several other useful features available to us in attribute table mode. Right click on the title cell for the VegType field and choose Sort Ascending. Notice how the table is now ordered alphabetically variable. Take your cursor and click on the left- most cell of one of the records in the table. Notice that the row has containing the record is highlighted- if we look at the view, we’d also see that the corresponding polygon in the view is highlighted. Click on the “Selected” button at the bottom of the screen to see just the highlighted record. Spatial Analysis of Forest Landscapes 30 When you’re finished, close any attribute tables that are open. Watersheds Let’s prepare a separate data frame that contains the watershed boundaries. Make sure you are in display mode and right click on the Watersheds layer in the Study Area data frame and choose copy. From the Insert menu, choose data frame. Paste the Watersheds layer into the new data frame by right clicking on the new data frame and choosing Paste Layer. Name the new data frame “Watersheds” and make the layer visible. You may want to switch the table of contents from source to display mode. Save your map document! Open the attribute table of the Watersheds layer. Let’s calculate the relative size of each of the watersheds. First, get the sum of all watershed areas by right clicking on the “Area” variable and choosing the “Statistics” option. This will provide some summary statistics for the active variable. The sum figure (77113363) is what we’re interested in. Close the Statistics box by choosing the X in the upper right corner. Let’s manipulate the attribute table to create the percentage variable: Spatial Analysis of Forest Landscapes 31 1. Choose Add Field from the Options button. 2. Create a new variable called “area_pct” by typing this name into the Name box, select Float as the Type, set Precision to 8, and set Scale to 1. Choose OK. 3. Right click on the newly created area_pct field and choosing the Field Calculator. Choose Yes if you’re warned about calculating outside of an edit session. 4. Double click on the AREA field, key in a space, single click on the division operator, enter a space, type in the summary area (77113363), enter a space, single click on the multiply operator, enter a space, and type in the value 100. Choose OK to run the calculation. Spatial Analysis of Forest Landscapes 32 This process should’ve created a new field that captured the percent of watershed area contained by each watershed. Close the attribute table, right click on the Watersheds layer in the Watersheds data frame, and access its properties. Under the Labels tab, choose AREA_PCT as the Label Field. Choose OK. Right click on the Watersheds layer in the Watersheds data frame and choose Label Features. If you don’t see this variable, you may need to save your Map Document (mxd file). If this doesn’t work: save, close, and re-open your session.
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved