Geog, IES 377/Cee 357 Exercise 4 Page: 1/9 GEOG 377/CEE 357: An Introduction to Geographic Information Systems Exercise 4 Compiling a Spatial Database: Adding and Linking Attribute Data 1. Introduction (Two Weeks) Due Dates: Lab 301: October 28, 2002 Lab 302: October 29, 2002 Lab 303: October 30, 2002 Lab 304: November 1, 2002 (Total of 20 points) This semester s project needs a total of five data layers (see table below). You have now digitized, imported, transformed, edited, and created topology for the landuse map. At this point, we can say that the spatial data portion of the landuse map is complete. Now it is time to supplement the spatial data with attribute information. Data Layer Format Coordinate System Status Landuse Map ARC/INFO Coverage UTM Needs attributes Road Map ARC/INFO Coverage UTM Not in workspace Sewer Line Map ARC/INFO Coverage UTM Not in workspace Soil Map ARC/INFO Interchange file UTM Not yet created Stream Network Map ARC/INFO Generate file UTM Not yet created 2. Your Exercise 4 In this exercise, you will assign attribute data to the landuse polygons giving them some descriptive meaning. MAKE SURE TO READ CAREFULLY! You want to really understand the operations we are going to perform in this exercise, because you will use these techniques to enter the attribute data for other data layers in Exercise 5. 2.1 Getting Attribute Data into the LANDUSE Coverage: The attribute data you need to attach to the landuse polygons are given in the table in next page. The first item (LANDUSE-ID) is the landuse polygon number (user specified polygon IDs). The second column (LU-CODE) is the landuse types (landuse classification codes). The third column (COST/HA) contains the purchase cost per hectare of land. Basically, there are two steps to link the landuse attribute data to the landuse polygons in the LANDUSE coverage. First, you create an empty INFO table and enter the attribute data into this table. (An INFO table is a data table in a special data format, which can be efficiently handled by ARC/INFO. All the data tables in ARC/INFO, such as the Polygon Attribute Table (PAT) and Arc Attribute Table (AAT) of a coverage, are INFO tables.) When you get this table (we call it LANDATTR.DAT), you will link this table to the builtin polygon attribute table of the LANDUSE coverage (LANDUSE.PAT). In this way, you link the attribute data to the polygons in this coverage.
Geog, IES 377/Cee 357 Exercise 4 Page: 2/9 LANDUSE-ID LU-CODE COST/HA 1 500 0 2 700 20000 4 200 15000 5 100 40000 8 200 20000 12 100 40000 13 700 20000 15 200 20000 17 200 20000 18 100 40000 19 300 20000 20 400 15000 21 400 20000 23 300 20000 25 400 10000 27 200 15000 28 300 10000 33 300 15000 35 100 30000 37 300 10000 38 200 20000 39 200 15000 40 300 10000 42 400 10000 45 200 15000 46 400 10000 50 300 10000 51 400 10000 55 200 15000 56 300 10000 59 200 15000 61 300 10000 62 200 15000 63 200 15000 64 300 10000 67 200 20000 68 400 10000 69 300 10000 72 300 10000 73 200 15000 76 200 15000 NOTE: There is a bug in the ArcGIS software that causes some of the data entered into the table to disappear. If this occurs, try entering the data into the table again. If you still have problems, consult your TA.
Geog, IES 377/Cee 357 Exercise 4 Page: 3/9 LU- CODE Landuse Type 100 Urban 200 Agriculture 300 Brush Land 400 Forest Land 500 Water 600 Wetlands 700 Barren 2.1.1 Check the label IDs of the landuse polygons The LANDUSE-ID will be the relating item (or linking key) with which we link the attribute data table LANDATTR.DAT and the built-in polygon attribute table LANDUSE.PAT. Therefore, we want to be very sure that the values in this item (LANDUSE-ID) of LANDUSE.PAT are 100% correct. This is the last chance for you to correct errors in digitization without too much pain. If you found errors some time later, and had to come back and start over, you would waste a lot of time and might get frustrated. Now you can start ArcTools of ARC/INFO Workstation and check the following issues:?? Both the number of polygons and number of labels should be 41;?? Each polygon should have one and only one label;?? The LANDUSE-ID value of each label (or polygon) should match with the correspondent value on the paper map. 2.1.2 Creating the INFO Table LANDATTR.DAT 2.1.2.1 Launch the table-defining tool in ArcCatalog (remember to connect to your workspace on the D drive) ArcCatalog -> New -> INFO Table A panel like below will show up for you to create and define an empty table.
Geog, IES 377/Cee 357 Exercise 4 Page: 4/9 2.1.2.2 Define the table Defining a table means setting properties for the items of the table. For every item, we need to set four basic properties: Item type, Item Name, Item width and display width. The table below gives the description of these properties. Property Item type Item name Item width Display width Description Data type of the item. The most common item types are: Character - any combination of alphanumeric characters Integer - any digits that make up a valid integer Binary integer - an integer number stored in binary format Number - any digits that make up a valid decimal number Binary floating point - a decimal number stored in binary format Date - stored as 8 bytes; displayed as 8 or 10 spaces. Any name (up to 16 alphanumeric characters -- names must begin with an alpha character) Number of spaces (or bytes) used to store item values Number of spaces used to display item values Decimal places For Number or Floating point, the # of digits to the right of the. Refer to the panel below, set the name of the new table (Output table ) as LANDATTR.DAT (make sure you create this table in your workspace, D:\sitedata), and set the properties of the first item of our table as follows: Item type: Binary Item name: LANDUSE-ID Item width: 4 Display width: 5 We want to set the Item type of LANDUSE-ID to be Binary because: (1) Binary is a data type that can efficiently save integer numbers, and by checking the values of LANDUSE-ID item (see the table in page 2) we found that all the values of this item are integer numbers.
Geog, IES 377/Cee 357 Exercise 4 Page: 5/9 (2) More important, its correspondent item in LANDUSE.PAT has a Binary type (We know this by looking at the properties of LANDUSE.PAT in ArcCatalog.). Because later on we are going to use this item as the linking key to join the two tables, the two tables must have the same type on this item. We set the Item width to be 4, because this number of spaces is sufficient to store very large integer values. We set the Display width to be 5, because this number of display spaces is sufficient to separate this item from others when we list the table on screen. When you finish the first item (LANDUSE-ID), click the New item button to continue to define the second item (LU-CODE); then the third one (COST/HA). By checking the values of these two items, and referring to how we define the LANDUSE-ID, you should be able to define these two items by yourself. After you define all the three items, click the OK button. Now you have got a new empty INFO table with name LANDATTR.DAT in your workspace, and are ready to input data to it. 2.1.3 Input data to LANDATTR.DAT For inputting data to an INFO table, we need to use the third component of ArcGIS Desktop, ArcMap: Start -> Programs -> ArcInfo -> ArcMap On the cover panel of ArcMap, choose A new empty map, then click OK to Start using ArcMap. The steps of inputting data are as follows. (1) Load the table in ArcMap (2) Open the table File -> Add Data Choose the landattr.dat file. Note that this file will only appear in the source tab and not in the display tab in ArcMap. Right-click on the name of the table, and then choose Open. (3) Set the table to be editable (4) Input data In ArcMap use the Tools menu to select the Editor Toolbar. Select the Editor button at the upper left corner of the toolbar, and select Start Editing from the pull-down menu. At this point, you should be able to see there is a white, empty record in the table window (see below). The data you need to input can be found in page 2. Type the values of the first line of our table in this empty record. When you finish, a new empty record will automatically show up below the first one, and you can go on to enter the second line. In this way, you can type in the whole table into LANDATTR.DAT.
Geog, IES 377/Cee 357 Exercise 4 Page: 6/9 IMPORTANT: After all the data are input, double-check the values you entered, and make sure every value is correct (This will save you a lot of time in the following labs). When all the data seem good, go to the Editor and choose Stop Editing. You want to answer Yes to the question about whether you want to save the edits (of course). 2.1.4 Linking Spatial Data with Attribute Data An important concept: the only bridge that links attribute data to the spatial data in an ARC/INFO coverage is the coverage's built-in attribute tables. If you want to link the attribute data to the polygons in the coverage, you link the attribute data to the coverage's Polygon Attribute Table (PAT); or if you want to link the attribute data to the lines (arcs) in the coverage, you need to link the attribute data to the coverage's Arc Attribute Table (AAT). In this exercise, we are going to link our attribute data to the landuse polygons, so we want to link the table LANDATTR.DAT to the LANDUSE.PAT. Actually, what we are going to do is merge these two tables. This is achieved by using a common item, LANDUSE-ID, which is called the relate item in ARC/INFO. That is why you had to define the LANDUSE-ID item in LANDATTR.DAT exactly as it is defined in the LANDUSE.PAT (You can check the definition of LANDUSE.PAT with ArcCatalog). When merging tables, ArcGIS looks for the same value in the relate item from the two tables. When the relate item matches, the attributes for that specific record in the two tables are merged and written to the output table. In our case the relate item is used to merge the attributes in LANDATTR.DAT to the attributes in LANDUSE.PAT. Since we just want to add the data in LANDATTR.DAT to LANDUSE.PAT, the output table would still be LANDUSE.PAT.
Geog, IES 377/Cee 357 Exercise 4 Page: 7/9 We can merge the two tables through the Join Table tool in the ArcToolbox: ArcToolbox -> Data Management Tools -> Tables -> Join Tables You should set the parameters on the panel like below (the path to the workspace may be different). Note that the LANDUSE.PAT file can be located by navigating to the LANDUSE coverage, double -clicking on the coverage, and selecting the polygon file. Once the operation is completed, use ArcCatalog to preview the modified LANDUSE.PAT: Double click landuse in the left window of ArcCatalog, then select Polygon, then select Preview tab in the right window, then select Table from a menu at the bottom of the right window. You should be able to see that two new items, LU-CODE and COST/HA, as well as their values for each landuse polygon, have been added to the LANDUSE.PAT. 2.2 Printing a Simple Map from ArcGIS In the rest part of this exercise, we are going to print a hardcopy of the landuse map from ArcGIS. We print this map for the following reasons: 1. satisfy your curiosity on how to print a hardcopy map from ArcGIS; 2. allow you to have some "real" thing showing your achievement; and 3. allow you to compare your digitized map with the original one. We are going to print the map with ArcMap. We encourage you to explore the cartographic capabilities of ArcMap. Bbesides the landuse polygons, you need to include the items listed below in your printed map:?? Label points of the polygons?? IDs of polygons?? Tic points?? Map title?? North Arrow?? Scale Bar?? Your name
Geog, IES 377/Cee 357 Exercise 4 Page: 8/9 The steps are as follows. (1) If you accidentally closed ArcMap, launch it again. (2) Use Add Data to load your LANDUSE coverage from your workspace D:\sitedata. NOTE: You need to load polygons, labels and tics. To do this, in the file browse window, double-click LANDUSE, and then choose polygons, labels and tics. You can choose and add them one by one or Shift-Click to choose them all at once. (3) Right-click on the landuse label, choose Properties. On the Properties panel (see below), select Labels tab. Check Label Features in this layer, choose LANDUSE-ID as the Label Field, then OK it (on this panel, you can find many other cartographic options. You are certainly encouraged to play with them). (4) In the same way, you can set the options for drawing the tic points. (5) Also, you can also change the color and symbol of the landuse polygons. But we recommend that you not print the map in color in room 380. (6) Add a title to your map: First, change the view to Layout View (View -> Layout View); Second, insert the text "Landuse Map" (Insert -> Title); Then, adjust the size and position of the title. In the same way you can add the North Arrow and Legend (7) Use Insert -> Text to add your name on the map. (8) Save your map (File -> Save). (9) Send your map to the B+W printer (\\gispserv\p1), Do not print to the Color Printer (Borg) (File -> Print).
Geog, IES 377/Cee 357 Exercise 4 Page: 9/9 3. Questions (be as concise as possible): 1) Briefly discuss why you link attribute data to the spatial data. 2) Each item in an INFO table has four basic properties (Item name, Item width, Display width and Item type). List how these properties are set for the LANDATTR.DAT table and discuss why the Item type is set in this way. 3) Explain, in detail, what we have done by "joining" two tables with the Join Tables Tool. 4) What would happen when joining tables if the values in the LANDUSE-ID item are not identical in the two tables? 5) Explain the current relationship between the LANDUSE coverage, the LANDUSE.PAT table and the LANDATTR.DAT table. (In order to answer this question you will probably need to have a good grasp of the concepts in the lab, please re-read the lab if necessary). 6) Compare the hardcopy of your digitized landuse map to your original map. Are they exactly the same? If not, discuss in detail some of the reasons for the differences. If they are the same, please briefly describe what errors may arise when digitizing a map. 7) Write a one-paragraph summary of this lab exercise. The paragraph should logically list the major operations (not the specific commands) we have performed in this exercise and explain the reasons for performing these operations. 4. Things to Be Handed In: 1) Answers to the above questions. 2) A hardcopy of your digitized landuse map.