GEOGRAPHIC INFORMATION SYSTEMS LAB 1– BASIC GIS …gis.weavsplace.com/Labs/Lab 1 -Basic GIS...

16
GEOGRAPHIC INFORMATION SYSTEMS LAB 1BASIC GIS OPERATIONS WITH ARCGIS. Lab 1 – Basic GIS Operations With ArcGIS ArcGIS offers some advantages for novice users. The graphical user interface 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 help you to understand ArcGIS fundamentals and how to examine spatial data. ArcGIS is split into a set of modules by a single map file (*.mxd file). Only one module can be accessed at any one time. The GUI for each module offers different options depending on the active module and whether any software extensions have been activated. We will open two important ArcGIS modules in today’s exercises: ArcToolbox and ArcMap. 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 the Windows Explorer and navigate to your flash drive (should be E:), Let’s create a subfolder named ‘Lab_1’ on your flash drive. You can create the subfolder by clicking once on your workspace, choosing the File menu, the New option, and the Folder option. Open up a web browser and go to gis.weavsplace.com. Click on Class and Lab Assignments then the Week 2 link. Download the Lab_1 data to the folder you created called Lab_1 and unzip the file. FILE STRUCTURE IN ARCGIS 1. Shapefiles Includes both spatial and nonspatial data. Comprises the following file types for one feature layer representing a specific theme. city.shp this file stores the spatial data or the geometry of the feature (e.g. lines for roads, points for city centroid, polygon for county boundary) city.shx this file stores index of spatial data or feature geometry city.sbn and .sbx this file stores spatial index of the features city.dbf this file is for tabular data (also called a “tables of attribute data”) city.prj this file is for the projections & datum required for the layer city.shp.xml this file stores the metadata or information about the shapefile All the abovementioned files need to be in the same location in order to view and perform operations on the data. 2. Coverage A collection or set of feature classes or files. All the files are present in a subdirectory. These files contain both the graphic (location and shape data) and tabular (text, numbers, or other data) for variables of interest.

Transcript of GEOGRAPHIC INFORMATION SYSTEMS LAB 1– BASIC GIS …gis.weavsplace.com/Labs/Lab 1 -Basic GIS...

Page 1: GEOGRAPHIC INFORMATION SYSTEMS LAB 1– BASIC GIS …gis.weavsplace.com/Labs/Lab 1 -Basic GIS Operations with ArcGIS.pdf · GEOGRAPHIC INFORMATION SYSTEMS LAB 1– BASIC GIS OPERATIONS

GEOGRAPHIC INFORMATION SYSTEMS LAB 1– BASIC GIS OPERATIONS WITH ARCGIS.

Lab 1 – Basic GIS Operations With ArcGIS

ArcGIS offers some advantages for novice users. The graphical user interface 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 help you to understand ArcGIS fundamentals and how to examine spatial data. ArcGIS is split into a set of modules by a single map file (*.mxd file). Only one module can be accessed at any one time. The GUI for each module offers different options depending on the active module and whether any software extensions have been activated. We will open two important ArcGIS modules in today’s exercises: ArcToolbox and ArcMap. 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 the Windows Explorer and navigate to your flash drive (should be E:), Let’s create a subfolder named ‘Lab_1’ on your flash drive. You can create the subfolder by clicking once on your workspace, choosing the File menu, the New option, and the Folder option. Open up a web browser and go to gis.weavsplace.com. Click on Class and Lab Assignments then the Week 2 link. Download the Lab_1 data to the folder you created called Lab_1 and unzip the file.

FILE STRUCTURE IN ARCGIS

1. Shapefiles

• Includes both spatial and non‐spatial data. Comprises the following file types for one feature layer representing a specific theme.

� city.shp this file stores the spatial data or the geometry of the feature (e.g. lines for

roads, points for city centroid, polygon for county boundary)

� city.shx this file stores index of spatial data or feature geometry

� city.sbn and .sbx this file stores spatial index of the features

� city.dbf this file is for tabular data (also called a “tables of attribute data”)

� city.prj this file is for the projections & datum required for the layer

� city.shp.xml this file stores the metadata or information about the shapefile

• All the above‐mentioned files need to be in the same location in order to view and perform operations on the data.

2. Coverage

• A collection or set of feature classes or files.

• All the files are present in a sub‐directory.

• These files contain both the graphic (location and shape data) and tabular (text, numbers, or other data) for variables of interest.

Page 2: GEOGRAPHIC INFORMATION SYSTEMS LAB 1– BASIC GIS …gis.weavsplace.com/Labs/Lab 1 -Basic GIS Operations with ArcGIS.pdf · GEOGRAPHIC INFORMATION SYSTEMS LAB 1– BASIC GIS OPERATIONS

GEOGRAPHIC INFORMATION SYSTEMS LAB 1– BASIC GIS OPERATIONS WITH ARCGIS.

Lab 1 – Basic GIS Operations With ArcGIS

• There are approximately 9 files in a coverage, although additional files depend on the type of data.

ARCMAP

This is the central portion of ArcGIS and is where we look at data and create maps. Lets start an ArcMap session by clicking on the start button on the task bar and navigating to ArcGIS and 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.

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.

Page 3: GEOGRAPHIC INFORMATION SYSTEMS LAB 1– BASIC GIS …gis.weavsplace.com/Labs/Lab 1 -Basic GIS Operations with ArcGIS.pdf · GEOGRAPHIC INFORMATION SYSTEMS LAB 1– BASIC GIS OPERATIONS

GEOGRAPHIC INFORMATION SYSTEMS LAB 1– BASIC GIS OPERATIONS WITH ARCGIS.

Lab 1 – Basic GIS Operations With ArcGIS

Use the resulting dialog box to indicate the location of your network folder. Choose OK when you have the folder selected.

Once you’ve established a workspace connection, you should be able to select the workspace using the drop down option under the Look in: prompt in the Add Data dialog.

Page 4: GEOGRAPHIC INFORMATION SYSTEMS LAB 1– BASIC GIS …gis.weavsplace.com/Labs/Lab 1 -Basic GIS Operations with ArcGIS.pdf · GEOGRAPHIC INFORMATION SYSTEMS LAB 1– BASIC GIS OPERATIONS

GEOGRAPHIC INFORMATION SYSTEMS LAB 1– BASIC GIS OPERATIONS WITH ARCGIS.

Lab 1 – Basic GIS Operations With ArcGIS

Using your mouse and control or shift key, select all four files in the lab1 folder and choose the Add button.

ArcMap allows us to manipulate the display of spatial data and perform basic analyses. Anytime you add data into ArcMap, you are adding it to a data frame. You can have multiple datasets open at the same time in a frame and each data set it referred to as a layer. The names of data frames and layers and access to how you display each layer are in the table of contents, located on the left side of ArcMap. ArcMap has powerful features for controlling how points, lines, and polygons are displayed. You may have multiple data frames in ArcMap. You can assign a name to a data frame by accessing its properties, selecting the General tab, and typing in the Name box. Properties can be accessed by double clicking on the data frame or right clicking on the data frame and choosing Properties from the menu that appears.

The last operations should have opened all four Arcview shapefiles covers into ArcMap. In ArcGIS terminology, each these covers are now known as “layers” and are contained in the Layers data frame. By default, ArcGIS makes each of the layers visible.

Page 5: GEOGRAPHIC INFORMATION SYSTEMS LAB 1– BASIC GIS …gis.weavsplace.com/Labs/Lab 1 -Basic GIS Operations with ArcGIS.pdf · GEOGRAPHIC INFORMATION SYSTEMS LAB 1– BASIC GIS OPERATIONS

GEOGRAPHIC INFORMATION SYSTEMS LAB 1– BASIC GIS OPERATIONS WITH ARCGIS.

Lab 1 – Basic GIS Operations With ArcGIS

To make a layer not visible, just uncheck the check box located to the left of each layer name in the table of contents.

MANIPULATING LAYERS

An important concept in ArcGIS is the notion of the active data frame. If you have multiple data frames in the table of contents, any operations you invoke will only consider the active data frame. You can make a data frame active by right clicking on the data frame in the table of contents and choosing Activate from the pop‐up menu. The active data frame will be in a bold font. Layers are generally made active and accessed one at a time for display manipulations but it is possible to have multiple active layers by clicking and holding the control key down. This may be useful for copy or deleting several layers at once. Active layers are indicated by highlighting in the table of contents. It is also possible to copy and paste layers between different data frames; this skill may help you during course exercises. You can also assign a name to an active layer by double clicking or right clicking on the layer name, making the General tab active, and typing a name in the Layer Name box. This new name will now appear in the table of contents.

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. In the graphic above, SE_wtrshed is the active layer and is at the bottom of the stack, all other layers are being drawn over SE_wtrshed. Let’s see what happens when we move SE_wtrshed to the top of the stack.

Page 6: GEOGRAPHIC INFORMATION SYSTEMS LAB 1– BASIC GIS …gis.weavsplace.com/Labs/Lab 1 -Basic GIS Operations with ArcGIS.pdf · GEOGRAPHIC INFORMATION SYSTEMS LAB 1– BASIC GIS OPERATIONS

GEOGRAPHIC INFORMATION SYSTEMS LAB 1– BASIC GIS OPERATIONS WITH ARCGIS.

Lab 1 – Basic GIS Operations With ArcGIS

Let’s move it back to the bottom of the stack.

“SE_wtrshed” is an unusual name. Let’s change the name of the layer as it appears in the table of contents by activating its Properties and typing the name “Watersheds” in the Layer Name input box and choosing OK. Notice that the name of the layer has changed.

When you open multiple layers at the same time into a view, ArcMap will automatically adjust to the full geographic extent of all layers so that you are able to see all areas. This may be helpful in some cases but for today’s example, we are really only interested in the southeastern corner of Pennsylvania. ArcMap features a floating tool bar that allows us to interact with data frames and layers.

ArcMap has several options for zooming in and out of the map display area. Let’s use the zoom in tool to focus on our study area. Select the zoom in tool by clicking on it with your mouse.

Page 7: GEOGRAPHIC INFORMATION SYSTEMS LAB 1– BASIC GIS …gis.weavsplace.com/Labs/Lab 1 -Basic GIS Operations with ArcGIS.pdf · GEOGRAPHIC INFORMATION SYSTEMS LAB 1– BASIC GIS OPERATIONS

GEOGRAPHIC INFORMATION SYSTEMS LAB 1– BASIC GIS OPERATIONS WITH ARCGIS.

Lab 1 – Basic GIS Operations With ArcGIS

Notice how your cursor changes shape? This will happen with some of the tools that you use. Now click and draw a box that covers the watershed areas in the map display area. 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. Your new perspective should look similar to the figure below.

If you click on the zoom to previous extent button, you will be returned to the previous map extent.

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.

Changing a Layer’s Display

Double‐clicking on a layer will open the layer’s properties. Choosing the Symbology tab gains you access to change the color, shape, and size of geographic shapes in the map display. It allows you to pick the attribute information you wish to represent your geographic shapes. It also offers you multiple options for scaling the way attribute information is displayed. When you add a layer to a data frame, ArcMap chooses colors for your layers. Let’s practice changing the way the “Watersheds” appears by double clicking on the layer the table of contents. This should open the properties. Let’s make the Symbology tab active. Clicking on the colored symbol will open the Symbol Selector.

Page 8: GEOGRAPHIC INFORMATION SYSTEMS LAB 1– BASIC GIS …gis.weavsplace.com/Labs/Lab 1 -Basic GIS Operations with ArcGIS.pdf · GEOGRAPHIC INFORMATION SYSTEMS LAB 1– BASIC GIS OPERATIONS

GEOGRAPHIC INFORMATION SYSTEMS LAB 1– BASIC GIS OPERATIONS WITH ARCGIS.

Lab 1 – Basic GIS Operations With ArcGIS

Pick a color with a light shade by single clicking and choosing the OK button. Clicking on Apply will change the color in the map display area.

We can also use the Symbology interface to color code a layer based on a variable within the layer’s attribute table. Select Categories, then Unique Values from the choices on the right. Use the drop down box by the Value Field line and choose HUC from the list of variables. Next, select the Add All Values button and choose apply. Do you notice any changes in your map display regarding the way the layer is displayed?

Let’s revert to a single layer color by choosing Features, Single Symbol in the Symbology input and hitting the OK button.

Let’s follow the same process for the rivers layer so that a nice deep blue represents the rivers. You may want to adjust the width of the lines to make viewing easier. We may also want to change the name as it appears in the Table of contents to Rivers.

Page 9: GEOGRAPHIC INFORMATION SYSTEMS LAB 1– BASIC GIS …gis.weavsplace.com/Labs/Lab 1 -Basic GIS Operations with ArcGIS.pdf · GEOGRAPHIC INFORMATION SYSTEMS LAB 1– BASIC GIS OPERATIONS

GEOGRAPHIC INFORMATION SYSTEMS LAB 1– BASIC GIS OPERATIONS WITH ARCGIS.

Lab 1 – Basic GIS Operations With ArcGIS

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.

Another very useful tool is the identify tool. We will this and an automatic labeling option under the layer properties menu.

Make the identify tool active by clicking on it with your mouse.

Change the name of the “PA_cities_nad83” layer to Cities. Use the identify tool and click on one of the point locations associated with the Cities layer. A table should pop up. This table includes all the data associated with that point location. Notice that you can click on other points and the information in the table will change to reflect the other points. Let’s change the symbology of the Cities layer so that it stands out more.

Let’s experiment with the label tool. Right click on the Cities layer and choose Label.

Features from the pop up menu. We can turn this feature off by right clicking again and re‐checking Label Features.

Page 10: GEOGRAPHIC INFORMATION SYSTEMS LAB 1– BASIC GIS …gis.weavsplace.com/Labs/Lab 1 -Basic GIS Operations with ArcGIS.pdf · GEOGRAPHIC INFORMATION SYSTEMS LAB 1– BASIC GIS OPERATIONS

GEOGRAPHIC INFORMATION SYSTEMS LAB 1– BASIC GIS OPERATIONS WITH ARCGIS.

Lab 1 – Basic GIS Operations With ArcGIS

Attribute Data

Attribute data are the data associated with layers. It’s relatively easy to access this information in ArcMap and we can edit, summarize, and export attribute data. ArcMap will also allow you to import database files from other GIS packages, dBase files, and even from text files. You can also export data into these same formats. You may have multiple tables in a project.

You can open a layer’s attribute data by:

1. Right clicking on the layer.

2. Choosing Open Attribute Table from the pop up menu.

Once attribute data are displayed, they can be easily edited. ArcMap will also allow you to add and delete variables. Character variables must be created as a string type. You can use the field calculator to perform calculations on entire database or on portions of it. Make “Watersheds” the active layer and open its attribute table using the method described above. Notice that data are displayed for each of the seven polygon records contained in the layer.

The area measurements are in square feet. Let’s add a new variable that describes the size of each watershed as a percentage of all watersheds. First, select the options tab, then choose Add Field.

Let’s add a new variable by selecting the “Add Field” option under the edit menu. Enter pct_area in the name box, make sure type is set to Short Integer, enter 6 in the precision box, and choose OK.

Before we can calculate an watershed percentage, we need to know the sum of the watershed areas. Right click on the top of the area variable and choose statistics. The number we want is the sum: 4089487056.695.

Page 11: GEOGRAPHIC INFORMATION SYSTEMS LAB 1– BASIC GIS …gis.weavsplace.com/Labs/Lab 1 -Basic GIS Operations with ArcGIS.pdf · GEOGRAPHIC INFORMATION SYSTEMS LAB 1– BASIC GIS OPERATIONS

GEOGRAPHIC INFORMATION SYSTEMS LAB 1– BASIC GIS OPERATIONS WITH ARCGIS.

Lab 1 – Basic GIS Operations With ArcGIS

Let’s finish our calculation by right clicking the top of the pct_area variable and selecting Calculate Values.

A dialog box should open that is similar to the one above. We need to build an expression in the input box that divides the area of each watershed by the sum of all watershed areas.

To get an integer percentage, we’ll need to multiply this result by 100.

We can sort the attributes by right clicking and using options from the popup menu. Let’s experiment a little with this. You can also select records and see their locations in the map display area. Let’s try this option also. We should also check our results by performing a statistics option on the pct_area field; this should sum to 100 or something very close.

Page 12: GEOGRAPHIC INFORMATION SYSTEMS LAB 1– BASIC GIS …gis.weavsplace.com/Labs/Lab 1 -Basic GIS Operations with ArcGIS.pdf · GEOGRAPHIC INFORMATION SYSTEMS LAB 1– BASIC GIS OPERATIONS

GEOGRAPHIC INFORMATION SYSTEMS LAB 1– BASIC GIS OPERATIONS WITH ARCGIS.

Lab 1 – Basic GIS Operations With ArcGIS

Notice that you can hold down the control or shift keys and make multiple record selections. You can unselect records by choosing Clear Selection from the option button. Let’s clean up our work by making the pct_area field active by right clicking on its top, and choosing Delete Field from the popup menu. Let’s close this table.

Let’s explore some additional attribute table options by going to the Rivers layer and opening its attribute table. One of the tools we have in the attribute portion is the ability to summarize a variable. Let’s test how this works.

1. Find the variable titled “NAME” and make it active by right clicking on its top. “NAME” is the name of each river in the Rivers layer.

2. From the pop‐up menu choose summarize and OK. This should create and add to your ArcMap session another attribute table that shows the number or arcs, or line segments, which are associated with each unique occurrence of “NAME.”

3. You’ll find the new table in your table of contents. You need to right click on it and choose Open to get a look at it.

If we want more than just a frequency distribution, we’ll need to modify what we enter in the summarize box. Let’s find out which river is the longest. Go back to the attribute table for Rivers (you may need to re‐open it from the table of contents).

1. Right click on NAME and choose the summarize tool.

2. Find the variable LENG_MILE in the list of variables in the dialog box, expand its listing, and check Sum.

Page 13: GEOGRAPHIC INFORMATION SYSTEMS LAB 1– BASIC GIS …gis.weavsplace.com/Labs/Lab 1 -Basic GIS Operations with ArcGIS.pdf · GEOGRAPHIC INFORMATION SYSTEMS LAB 1– BASIC GIS OPERATIONS

GEOGRAPHIC INFORMATION SYSTEMS LAB 1– BASIC GIS OPERATIONS WITH ARCGIS.

Lab 1 – Basic GIS Operations With ArcGIS

The output table lists each river’s record number, name, number of arcs, and total length.

Page 14: GEOGRAPHIC INFORMATION SYSTEMS LAB 1– BASIC GIS …gis.weavsplace.com/Labs/Lab 1 -Basic GIS Operations with ArcGIS.pdf · GEOGRAPHIC INFORMATION SYSTEMS LAB 1– BASIC GIS OPERATIONS

GEOGRAPHIC INFORMATION SYSTEMS LAB 1– BASIC GIS OPERATIONS WITH ARCGIS.

Lab 1 – Basic GIS Operations With ArcGIS

The Sort button can help identify the longest or shortest river. Let’s close these output tables and return to the ArcMap display area. Let’s rename our data frame by double clicking on it in the table of contents and entering the name “Watershed Area” into the name box.

Choose OK to make the change take effect.

Page 15: GEOGRAPHIC INFORMATION SYSTEMS LAB 1– BASIC GIS …gis.weavsplace.com/Labs/Lab 1 -Basic GIS Operations with ArcGIS.pdf · GEOGRAPHIC INFORMATION SYSTEMS LAB 1– BASIC GIS OPERATIONS

GEOGRAPHIC INFORMATION SYSTEMS LAB 1– BASIC GIS OPERATIONS WITH ARCGIS.

Lab 1 – Basic GIS Operations With ArcGIS

Eventually, we’ll want to create a set of maps of our watersheds and their locations. Let’s create a new data frame that will hold the Pennsylvania outline and the watershed polygons.

From the Insert menu, choose data frame. Note that a new data frame should be added to your table of contents and should be active (in bold). Let’s right click on the state_nad83 layer and choose copy from the popup menu. Right click on the new data frame in the table of contents and choose paste. Let’s repeat this process for the Watersheds layer. When finished pasting, remove the state_nad83 layer from the Watershed Area layer by right clicking on it and choosing remove.

Let’s clean the title and appearance of the state_nad83 layer. Change the layer name to Pennsylvania and change the symbol color to hollow.

Let’s also rename the new data frame to Watershed Location.

Let’s activate the Watershed Area data frame by right clicking on it and choosing activate from the popup menu. Choose the Full Extent button to refresh the display.

Let’s save this map document. Choose Save As from the file menu. Make sure that you are saving under your lab1 workspace and save this file as lab1.mxd. All work you have done has been saved up to this point. You can re‐open this file to get back to where you left off.

Page 16: GEOGRAPHIC INFORMATION SYSTEMS LAB 1– BASIC GIS …gis.weavsplace.com/Labs/Lab 1 -Basic GIS Operations with ArcGIS.pdf · GEOGRAPHIC INFORMATION SYSTEMS LAB 1– BASIC GIS OPERATIONS

GEOGRAPHIC INFORMATION SYSTEMS LAB 1– BASIC GIS OPERATIONS WITH ARCGIS.

Lab 1 – Basic GIS Operations With ArcGIS