Introduction to ArcGIS 9 - Texas A&M University · for maps and spatial data, exploring spatial...

12
Introduction to ArcGIS 9.x Prepared by Francisco Olivera, Ph.D., P.E., Srikanth Koka and Lauren Walker Zachry Department of Civil Engineering Texas A&M University September 8, 2006 Contents: Brief Overview of ArcGIS 9.x Goals of the Exercise Computer and Data Requirements Procedure: 1. Creating Geodatabases, Feature Datasets, and Feature Classes 2. Displaying Spatial Datasets in a Map 3. Accessing Attribute Data 4. Selecting Objects of a Geodatabase Table 5. Making a Chart 6. Consolidating Your Results for Presentation Brief Overview of ArcGIS 9.x ArcGIS 9.x is a geographic information systems (GIS) platform developed by Environmental Systems Research Institute (ESRI). ArcGIS 9.x consists of three components: ArcCatalog, ArcMap and ArcToolBox. ArcCatalog is used for browsing for maps and spatial data, exploring spatial data, viewing and creating metadata, and managing spatial data. ArcMap is used for visualizing spatial data, performing spatial analysis, and creating maps to show the results of your work. ArcToolBox is a “wizard” for the existing ArcGIS 9.x tools, which has data conversion tools, data management tools and limited data analysis tools. Goals of the Exercise To introduce you to ArcGIS: ArcCatalog and ArcMap. Texas A&M University Department of Civil Engineering

Transcript of Introduction to ArcGIS 9 - Texas A&M University · for maps and spatial data, exploring spatial...

Page 1: Introduction to ArcGIS 9 - Texas A&M University · for maps and spatial data, exploring spatial data, viewing and creating metadata, and managing spatial data. ArcMap is used for

Introduction to ArcGIS 9.x

Prepared by Francisco Olivera, Ph.D., P.E., Srikanth Koka and Lauren Walker Zachry Department of Civil Engineering

Texas A&M University September 8, 2006

Contents:

Brief Overview of ArcGIS 9.xGoals of the Exercise Computer and Data Requirements Procedure:

1. Creating Geodatabases, Feature Datasets, and Feature Classes 2. Displaying Spatial Datasets in a Map 3. Accessing Attribute Data 4. Selecting Objects of a Geodatabase Table 5. Making a Chart 6. Consolidating Your Results for Presentation

Brief Overview of ArcGIS 9.x ArcGIS 9.x is a geographic information systems (GIS) platform developed by Environmental Systems Research Institute (ESRI). ArcGIS 9.x consists of three components: ArcCatalog, ArcMap and ArcToolBox. ArcCatalog is used for browsing for maps and spatial data, exploring spatial data, viewing and creating metadata, and managing spatial data. ArcMap is used for visualizing spatial data, performing spatial analysis, and creating maps to show the results of your work. ArcToolBox is a “wizard” for the existing ArcGIS 9.x tools, which has data conversion tools, data management tools and limited data analysis tools.

Goals of the Exercise To introduce you to ArcGIS: ArcCatalog and ArcMap.

Texas A&M University Department of Civil Engineering

Page 2: Introduction to ArcGIS 9 - Texas A&M University · for maps and spatial data, exploring spatial data, viewing and creating metadata, and managing spatial data. ArcMap is used for

Computer and Data Requirements To complete this exercise, you need ArcGIS 9.0. You will be working with the following spatial datasets: a polygon shapefile of the counties of Texas called “Counties” and a point shapefile of pan evaporation stations called “Evap.” These shapefiles consist of seven files each – evap.dbf, evap.prj, evap.sbn, evap.sbx, evap.shp, evap.shp.xml, evap.shx, counties.dbf, counties.prj, counties.sbn, counties.sbx, counties.shp, counties.shp.xml and counties.shx. Download the Ex1Data.zip file containing the data, which is in the same folder where this document is located. Unzip or extract it and save the files to a working directory on your computer. Make sure to remember the location of these files so that you can use them later.

Procedure Note that the following procedure is a general outline that can be followed to complete this lesson. However, you are encouraged to experiment with the program and be creative. 1. Creating Geodatabases, Feature Datasets and Feature Classes A geodatabase is a relational database that stores geographic information. In turn, a relational database is a collection of tables logically associated to each other by common key attributes. It is said that a geodatabase can store geographic information because, besides storing numbers or strings in the attribute columns, it can store features or geometric objects (i.e., polygons, lines or points) with defined shape and location. A geodatabase has an extension mdb. Tables in a geodatabase are called object classes. A feature class is a special type of object class that contains features. Thus, a feature class is a collection of features that have the same behavior and the same set of attributes. Note that feature classes do not need to be stored inside a feature dataset, and can be stored as stand alone classes in the geodatabase. A feature dataset is a collection of feature classes that share the same spatial reference. The spatial reference describes both the projection and extent for a feature class in the geodatabase.

A. Creating a new geodatabase: (1) Open ArcCatalog.

(2) On the left panel, search for the folder where you want to create your

geodatabase. If the folder is not there, you need to right-click in the left panel and select “Connect Folder.” Select the appropriate folder.

(3) Right-click on the folder name or icon.

Texas A&M University Department of Civil Engineering 2

Page 3: Introduction to ArcGIS 9 - Texas A&M University · for maps and spatial data, exploring spatial data, viewing and creating metadata, and managing spatial data. ArcMap is used for

(4) Click New/Personal Geodatabase, a new geodatabase – called New Personal Geodatabase.mdb and represented by an icon with the shape of a cylinder – will be created.

(5) Overwrite the name of the geodatabase with Ex1Data (the geodatabase will keep

its file extension .mdb regardless of whether you have included it in the name or not).

B. Adding data to the Ex1Data.mdb geodatabase within a feature dataset (1) In ArcCatalog, right-click on the name or icon of Ex1Data.mdb. (2) Click New/Feature Dataset

(3) Name the new dataset Texas and click on Edit.

(4) Click Import, and browse for the shapefile Counties and click Add. Click OK

twice. This gives your Feature Dataset the spatial extent and projection of Counties. Data should not be added to a feature dataset before its spatial extent and projection are defined.

(5) Right-click on the name or icon of Ex1Data.mdb\Texas

(6) Click Import/Feature Class(multiple)

(7) Locate and add the Counties and Evap shapefiles and Add both to the Feature

Class(multiple) window and click OK After creating the geodatabase, the feature dataset and the feature classes, the ArcCatalog tree in the left pane should look like this when all the “+” boxes are clicked:

Note that the feature classes Counties and Evap could have been created outside the feature dataset Texas; but because they share the same spatial extent, they were grouped together. In ArcCatalog, you can toggle the right panel display between a file tree (Contents tab), a data view (Preview tab), and a metadata document (Metadata tab). The preview option allows one to display the feature class shapes and table, by selecting geography or table at the bottom of the panel. You may close the ArcCatalog program.

Texas A&M University Department of Civil Engineering 3

Page 4: Introduction to ArcGIS 9 - Texas A&M University · for maps and spatial data, exploring spatial data, viewing and creating metadata, and managing spatial data. ArcMap is used for

2. Displaying Spatial Datasets in a Map In ArcMap, a layer consists of a reference to a spatial dataset (such as a feature class, shapefile or coverage) and a definition of how to display it (legend colors, line thickness, etc.), and a map is a graphical representation of geographic information. The left panel in the ArcMap window is the Table of Contents, and the right panel is the Display Window. The Table of Contents lists layers and the Display Window displays maps.

A. Displaying spatial data of Texas feature dataset in map

(1) Open ArcMap and then click on the Add Data button in the toolbar under the menu bar. Or click on Add Data from the File dropdown menu.

(2) Browse to the feature dataset Texas and click Add. You can also add each feature

class in the Texas feature dataset separately. Note that the Table of Contents lists the layers corresponding to the two feature classes of the Texas feature dataset that you just added, while the Display Window displays the map with the corresponding spatial data (i.e., Texas counties and evaporation stations).

Texas A&M University Department of Civil Engineering 4

Page 5: Introduction to ArcGIS 9 - Texas A&M University · for maps and spatial data, exploring spatial data, viewing and creating metadata, and managing spatial data. ArcMap is used for

(3) Save your work in a Map Document by choosing File/Save and, after navigating to your working directory, write the file name GISWREx1 (the file will automatically be assigned the extension mxd).

B. Modifying the display of the Counties layer in the map (1) Right-click on the Counties layer name and click the Properties menu button. (2) Click the Symbology tab and then click on the symbol color box. Make your

selections for the Fill Color, the Outline Width and the Outline Color, and click OK.

(3) Click OK again. Follow the same procedure to modify the display of the Evap

layer. Hopefully, the new map looks better than the original one. 3. Accessing Attribute Data Numerical and text information stored in the fields of the geodatabase tables is called attribute data.

A. At a specific location in ArcMap

(1) In ArcMap, make the layers Evap and Counties (assuming you want to retrieve information of both layers) visible and then click on the Identify tool on the Tools toolbar. If this toolbar is not available, turn it on by going to View/Toolbars/Tools.

(2) Click the location on the map in which you are interested. (3) The Identify Results window will open, in which the attributes of only the top

most layer are displayed. (4) To display the attributes of the features of both layers at a location in the map, in

the Identify Results window, select All layers in the Layers dropdown list. (5) Start clicking on your interested locations on the map. In the figure, attribute data

for the evaporation station in Lake Colorado City and Mitchell county have been retrieved; however, because Mitchell county is highlighted, the right panel of the Identify Results window displays attribute data of the evaporation station. You have to highlight the area number under the Counties tab to get the specific county attribute data.

Texas A&M University Department of Civil Engineering 5

Page 6: Introduction to ArcGIS 9 - Texas A&M University · for maps and spatial data, exploring spatial data, viewing and creating metadata, and managing spatial data. ArcMap is used for

B. Of an entire layer

(1) In ArcMap, right click on the Evap layer name in the Table of Contents.

Texas A&M University Department of Civil Engineering 6

Page 7: Introduction to ArcGIS 9 - Texas A&M University · for maps and spatial data, exploring spatial data, viewing and creating metadata, and managing spatial data. ArcMap is used for

(2) Click Open Attribute Table. Tables that contain attribute data of a layer are always called Attributes of <layer name> and contain a field called Shape. The Shape field displays the words “Point,” “Line” or “Polygon,” but really stores a geometric object with the shape and location of a point, line or polygon.

Note that record number 17 (designated with an arrow in the table) corresponds to the Lake Colorado City evaporation station. All attribute data is the same as previously retrieved by the Identify tool.

C. Calculating the statistics of a field

(1) In ArcMap, right-click on the header of the ANN_VAL field of the Attributes of Evap table (ANN_VAL corresponds to the annual evaporation).

(2) Select Statistics and a statistics chart is displayed in a separate window. You can

change the field for which statistics are calculated in the Statistics of Evap window.

Texas A&M University Department of Civil Engineering 7

Page 8: Introduction to ArcGIS 9 - Texas A&M University · for maps and spatial data, exploring spatial data, viewing and creating metadata, and managing spatial data. ArcMap is used for

(3) Close the attribute table and statistics window when finished looking at them.

4. Selecting Objects of a Geodatabase Table (points, lines and polygons) Selecting objects of a geodatabase table refers to identifying a subset of objects of the geodatabase table for a specific purpose. Object selection can be made from a map by identifying the geometric shape or from an attribute table by identifying the record. Regardless of how you select an object, both the shape in the map and the record in the attribute table will be selected.

A. Selecting an object from the map

(1) In ArcMap, click on Selection/Set Selectable Layers menu and in the wizard that opens, make sure that only the Counties layer is checked (to make only the county features selectable) then select close.

(2) Click on the Select Features tool in the Tools toolbar and in the display window,

click on the Counties polygon(s) you want to select. To select more than one object, press the Shift key and hold it down while you click on the additional objects. Selected objects are displayed with a light blue outline, although the color might change depending on your settings (to change the settings, click Selection/Options/Selection Color). The corresponding attribute table records have also been selected. You can verify this by opening the Counties attribute table and see that they are highlighted.

Texas A&M University Department of Civil Engineering 8

Page 9: Introduction to ArcGIS 9 - Texas A&M University · for maps and spatial data, exploring spatial data, viewing and creating metadata, and managing spatial data. ArcMap is used for

(3) To clear your selection, right-click on the layer name, and choose Selection/Clear Selected Features.

B. Selecting an object from the attribute table

(1) In ArcMap, click on the layer name Counties in the Table of Contents and select

Open Attribute Table. (2) In the Attribute Table, click on the square at the left of the records you want to

select. To select more than one record, press the Ctrl key and hold it down while you click on the additional records. Selected records are displayed with a light blue background, although the color might change depending on your settings. The corresponding objects in the map have also been selected. You can verify this by returning to the map window.

Texas A&M University Department of Civil Engineering 9

Page 10: Introduction to ArcGIS 9 - Texas A&M University · for maps and spatial data, exploring spatial data, viewing and creating metadata, and managing spatial data. ArcMap is used for

(3) To clear your selection, click on the Options button of the Attribute Table window, and choose Clear Selection. Close the table when complete.

5. Making a Chart A chart of one or more records selected from a geodatabase table can be plotted. Follow the directions below to plot the monthly evaporation of one or more stations.

(1) In ArcMap, select one or more evaporation stations from the Evap layer. If you

want to select features directly from the map, make sure to define the appropriate layer (in this case, Evap layer) as a “selectable layer” by clicking on Selection/Set Selectable Layers menu. In the wizard that opens, make sure that the layer you want is checked and then select close. Otherwise, select from the attributes table as described previously.

(2) Open the attribute table of the Evap layer. In the Attributes of Evap table, click on

the Options button and select Create Graph. (3) In the Graph wizard-Step 1 of 3 window – select Column as Graph type and click

Next; Step 2 of 3 window – check the fields JAN_VAL, FEB_VAL, …, DEC_VAL and click Next; Step 3 of 3 window – overwrite the Title with Evaporation, check the Label X Axis With box, and click Finish.

You will obtain a graph like this:

Texas A&M University Department of Civil Engineering 10

Page 11: Introduction to ArcGIS 9 - Texas A&M University · for maps and spatial data, exploring spatial data, viewing and creating metadata, and managing spatial data. ArcMap is used for

The color of all the columns in your graph might be black. If that were the case, leave it like that since it not related to any setting you have defined. Do not close your graph window yet, you will need it later. If you close it, you will have to create it again. Note that the charting capabilities of ArcMap are not as developed as those in other applications. To prepare more complex charts you can export your tabular data to other applications. 6. Consolidating Your Results for Presentation To consolidate a map of Texas counties with evaporation stations with the graph that you created before in a single sheet of paper, follow the directions.

(1) In ArcMap, change the format of the display window from Data View to Layout View by clicking on Layout View in the View dropdown menu.

(2) Reduce the size of the data frame (i.e., rectangle where the spatial data is

contained), to make room for the graph, by clicking on the page and moving its handlers.

(3) Right-click on the graph window title-bar and select Show on Layout. You can

move and resize the graph as necessary.

Texas A&M University Department of Civil Engineering 11

Page 12: Introduction to ArcGIS 9 - Texas A&M University · for maps and spatial data, exploring spatial data, viewing and creating metadata, and managing spatial data. ArcMap is used for

Your final map should look like this:

These materials may be used for research and educational purposes only. Please credit

the authors and the Department of Civil Engineering, Texas A&M University. All commercial rights reserved. Copyright 2004: Texas A&M University.

Texas A&M University Department of Civil Engineering 12