AreView, ArcData, and GPS (GPS and GIS) Part 3

Identifying Particular Features of a Particular Theme

{_} Make I090317a.shp active. Make Cty2m active—which makes I090317a no longer active. (More than one theme may be made active at a time, but this is a more advanced maneuver. For the moment, know how to make a single theme active, and how to make it visible.)

{__ } With Cty2m active and on, move the pointer to the "identify tool" button, which is at the extreme left of the tool bar.13 Click. Note that the button appears to be pushed in. The purpose of the "Identify Tool" is to let you query the table entry for a particular feature in the active theme. Move the pointer into the graphic part of the view window, to the county in which the GPS track starts (the northernmost county).

{__ } Note that the pointer has become a cross with a little "i" associated with it. Click on the county. Note that an "Identify Results" window appears. Please see Figure 5—8. Enlarge it vertically. From the window you can find out what the theme table (in ArcInfo it is a Polygon Attribute Table [PAT]) contains for the county selected. You will see the coverage’s Ids14 the county’s FIPS (Federal Information Processing Standard) codes, state, county, and subregion names. You learn that the county is Fayette, in Kentucky; that the state FIPS code is 21, the county FIPS is 067, and the overall FIPS code is 21067, which indicates, if you did not already know it, how an overall FIPS code is assigned. You also see numbers for the Area and Perimeter. These units come from the table and are those of the data from the original coverage (decimal degrees), not the projected units (meters in UTM). (Linear units and Areal units in decimal degrees are almost completely useless.)


{__ } Click on the county at the end of the GPS track. Loudon county, Tennessee? Click on the county just northeast of Loudon. It should be Knox. Note that you can examine the information for each of the counties you previously selected, just by clicking on the entry name that appears on the left side of the "Identify Results" window. Dismiss the "Identify Results" window.

An "Identify Results" window.

Figure 5-8. An "Identify Results" window.  

Magnifying and Moving the Graphic Image

{__ } Experiment with zooming and panning tools:15 Make certain that Cty2m is still the active theme. In the "View" menu select "Full Extent." You will see all the counties of Kentucky and Tennessee plus one county from each of the other states in the coterminous United States. (It takes a lot of time to draw all the counties in the United States, so I’ve abridged the coverage by selecting only the county in each state which is first alphabetically.) Pick "Zoom In" from that same menu. Click it to Zoom in. Zoom in again.16 Each time the view is magnified so the scale gets larger. In the (misnamed) "Scale" text field you can see the denominator of the scale fraction. This denominator becomes smaller and smaller, which means the actual scale, which is a fraction less than one, is getting larger and larger—that is, closer and closer to 1.0.

{__ } Select the panning tool (it’s the seventh tool button from the left; it looks like a hand); use the hand cursor on the map to drag Kentucky (KY) and Tennessee (TN) to the center of the window.

{__ } The fifth tool button from the left (a magnifying glass symbol with a "+" on it) lets you do a couple of things. If you make it the active tool and click on a point in the View, the image is zoomed up and the point you clicked on moves to the center of the new image. If you drag a rectangle on the window, the image initially within its area is transformed so that that image approximately fills the View window. This gives you considerable control over the amount by which you change the scale of the image. Zoom up on KY and TN. (If, at any time, you want to experiment with these features, you can take the View back to its Full Extent and rezoom and repan.)

{__} Make the I090317a.shp theme active. Under "View," "Zoom to (active) Themes." The entire GPS track should be visible, with some margins around it.

Selecting Features

Selecting features is an important aspect of ArcView. Features in a thememay be selected from an active view or an active table.

{__ } Move the cursor over the Select Features tool (a rectangularish icon, fourth from the left side on the toolbar). Read the description at the bottom of the screen. Click on this tool. Make the Cty2m theme active. Selection works only on active themes. Experiment: select a county by clicking on it. It should turn yellow. (By the way, you should probably avoid the use, through the Legend Editor, of that bright yellow color for themes, since it is the ArcView standard for selected features.) Select some other county polygons. To select more than one county at a time, hold down the shift key while clicking.

{__ } With the Select Feature tool, click on only Loudon county. In the View menu, pick "Zoom to Selected (features)." Loudon county should pretty much fill the width of the view window. If you zoom up on the eastern part of the county you should be able to see individual GPS fixes.

Adding Water

{_} In the ArcUSA database, find a coverage named "Lak2m." (Hint: choose "Add Theme" from the "View" menu or press the Add Theme icon on the button bar.) Add its polygon features as a theme to the view. Make its color a medium turquoise. Paint it on top of the counties, but under the GPS track.

{__ } Use the magnify tool to zoom up on a rectangle that encloses both the land and water at the end of the GPS track. It appears from the image that the vehicle that carried the GPS antenna must have been amphibious: several points appear offshore.

{__ } Use the measuring tool (it looks like a ruler with arrows and a question mark) to determine the distance from the shore to the furthest point on the GPS track. (Click on the tool, then on a point you want the distance from, then double-click on the point you want the distance to.) From the message at the bottom of the screen ("Length"), it appears that the antenna was a third of a kilometer from shore. In reality the vehicle stopped about 50 meters from the water. Where does the problem lie? The GPS track probably has its usual level of accuracy. (These are uncorrected fixes taken when SA was active so you can expect about 100-meter accuracy.) ArcUSA data are less accurate, however. They are taken from 1:2 million scale maps; if you read the manual that accompanied the data set you would find that lines may be expected to have an error of 1792 meters, or almost two kilometers. That would certainly more than account for the problem that we see with the GPS track and the lake.

{_} Zoom out, using the magnifying glass with the negative sign ("-") in it. As with the Zoom-in tool, if you click in the view, the point where you click moves to the center of the window and the scale changes. Also, with this tool you can drag a rectangle with the following characteristics:

1. The center of the rectangle will be the center of the zoomed-out window.

2. The area of the drawn rectangle approximates an area such that the entire existing view will all fit into that drawn rectangle. That is, the box you drag suggests the box that you want the entire currently-visible portion of the map to fit into. The smaller you make the dragged window the greater the degree of zooming out.

{_} Make the GPS track the active theme. Zoom to it. Rearrange and resize the View window so that it occupies the right half of the ArcView window. Narrow the T/C portion of the window by dragging the boundary between the T/C and the graphics to the left.

Bringing Up a Theme Table

With the identify tool you were able to see individual records of an active theme. You may also work with the entire Theme Table (in a ArcInfo coverage it’s a Feature Attribute Table) of any given theme. You do that next.

{__ } Make Cty2m the active theme. Under the "Theme" menu, pick "Table." The theme table of the polygon theme Cty2m will appear. (Move and resize this table so that it occupies the left half of the ArcView window.)

{__ } Note that there are 293 records (look at the toolbar). Use the horizontal and vertical slider bars to examine the contents of the table.

Making Queries, and Looking at Text and Graphics

One of the outstanding features of a GIS is that it provides the user with the ability to: make queries of a graphical database and get the answers with text; and make queries of a textual database and get the answers with graphics. The following actions will demonstrate how easy this is in ArcView.

{_} Make the "View1" window active by clicking in its title bar.

(You can usually make a window active by clicking anywhere in it, but if you click in places other than the title bar, you can produce unintended side effects!) Make the GPS theme (I090317a.shp) active. Zoom to (active) Themes.

{_} Select a polygon from Cty2m: Use the selection tool and click in the northernmost county that contains the GPS track to select that polygon. Note that it turns yellow. (If it didn’t, I sort of caught you. Before you can use the selection tool you have to make the theme you want to select from the active theme. In this case you probably didn’t make Cty2m the active theme. Try again.)

{_} Make the "Table" window active. Note that one record of the 293 is selected. That record will appear at the top of the window highlighted in yellow when you click the Promote button. The record corresponds to the selected county. What is the county name?

{__ } Use the "Find" choice in the "Table" menu to bring up a "Find" window. Type "Loudon" (no quotes). Both the record in the table and the graphical representation should become highlighted in yellow.

{_} Find "Knox." What state is it in?_. Find "Knox" again.

What state is it in? ______ . Try to find "Knox" once more.

{_} Check out another way to get Help: Click on the button with the arrow and the question mark. This changes the cursor to a similar icon. With this cursor active, the next time you click on the ArcView window you will (usually) get information about the element your cursor pointed to. It works only once for each click on the help button. Click on some other button or tool (the Find tool you just used, for example) and read about it. Now click twice on the help button, so you can read about the Help Button.

{__ } With the View window active, locate the button that is eleventh (11th) from the left border. It should look like a baggage tag. If it doesn’t, point to it and hold down the left mouse button. Pick the baggage tag out of the drop-down list. This is the Label button.

{__ } With the help button icon showing as your cursor, click on the Label button. You should get a help file named Label Tools. Peruse that file briefly, then dismiss it. Place the pointer over that 11th button and hold the left mouse button down. A drop-down menu will appear showing the choices you read about in the last step. Slide the pointer down the list and release it over the icon that looks like a baggage tag with a string attached. You have brought the Label Tool to the toolbar and made it the current tool.

{__ } With the view and Cty2M active, select properties under the theme menu. (Or find the equivalent button and press it.) Select Text Labels. In the Label Field, scroll to Cnty_name and click it. Uncheck the "Scale Labels" box. Okay the choices. Now, since the Label Tool is active and, since the county name is the selected text label, if you click in a county, the name of that county will be added as Graphics to the view. Check out several counties. If you make the pointer the tool active you can click on a text label and move or resize it. You can also delete the selected graphics with the keyboard delete (Del) key. To delete all graphics, pick Select All Graphics under the Edit menu; press the delete key.

{__ } Zoom to the extent of the GPS track. Make Cty2m the active theme. Using the selection tool, select all the counties that the GPS track runs through.

Labeled counties along the GPS track.

Figure 5-9. Labeled counties along the GPS track.

Click Theme ~ Auto Label. An Auto Label window will appear. Make sure that Cnty_name is in the Label Field. Click OK. The result should look like Figure 5—9. Delete the labels using, this time, Theme ~ Remove Labels.

{__ } Using the labeling, selecting, or identifying approaches described in previous steps, zoom out a bit and determine (and remember) the location of the Kentucky-Tennessee border. Then delete the graphics.

{_} Make the view active. With the selection tool, drag a slim, horizontal box that is contained entirely within several northern Tennessee counties, thereby selecting them. If you don’t like the results, try again.

{_} Make the table active. Under "Table," pick "Promote" to bring all the selected records to the top of the table.

{__ } Under the "Edit" menu, "Switch Selection." Note that the selected records in the table correspond to the selected polygons. Switch selections again. Then "Select None." Dismiss the theme table.

More Complex Selecting

The following actions demonstrate a fairly sophisticated selection technique. You will select the counties that the GPS track traverses in a different way than the method you used above.

{_} With the view window active, make I090317a.shp active.

Under the "Theme" menu, pick "Table." "Attributes of I090317a.shp" should appear. Enlarge the table to fit the left of the screen. The table has an attribute named "Shape" that is remarkably dull. It also has attributes Gps_time (the time at which each fix was taken) and Gps_height (in feet above sea level). Despite some shockingly large errors, because these data are uncorrected and taken while SA was active, you can determine something from the height. Both Lexington and Knoxville are at about 1000 feet MSL. The Cumberland mountains lie between them. By scrolling down the table, can you tell how many hours out of Lexington the car reached the highpoint of its journey through these mountains? _______ .

{__ } Find the greatest number in the Gps_height field in a simpler way. Click once on the field name. It will darken. Click again. It will lighten. It is selected when it is darker. Select it. In the Field drop-down menu pick "Sort descending." Now the largest number in that column should be at the top. Was it the value that you found in the previous step?

{__ } Again in the Field menu: pick "Statistics." Could come in handy, yes? You could select all the text with the mouse cursor, and cut and paste it in some other document (as I’ve done here). Sum: 712625.681 Count: 682 Mean: 1044.906 Maximum: 2464.377 Minimum: 186.908 Range: 2277.469 Variance: 150716.551 Standard Deviation: 388.222

{_} Make sure that that table is active. Using an icon that you’ll find on the _____ bar, sort the table with the Gps_time field, so that the earliest time is at the top. Now examine the table; note that the sort didn’t really work as you might like it to. 1:xx P.M. shows up before 12:xx P.M. To put the records back into their original order click "Refresh" in the "Tables" menu.

{__ } Under the "Edit" menu, "Select All." This should highlight all the records in the table and highlight the symbols showing the GPS track as well. Dismiss this table, but leave the "Attributes of Cty2m" table up, and leave the GPS track selected.

{__ } With the view window active and the Cty2m theme active as well, pick "Select By Theme" under the "Theme" menu. A dialog box appears. Set it up so that it selects features of the active theme that intersect the selected features of I090317a.shp. Make this a new set. To see all of what has been selected, zoom to selected features.

{_} Make the GPS track theme active. Under "Theme," clear selected features, so the track will reappear in red. (Yellow on yellow doesn’t provide much contrast.)

{__ } Look at the records of the selected counties: Make "Attributes of Cty2m" active. (Click on the title bar! If you click in the body of the window instead of in the title bar, you’ll lose the proper selections.) How many counties were selected? _.

Verify this graphically. To look at all the records of the selected counties, promote the selected records—this time use the "Promote" button.

{__ } Click on the record of Laurel county Kentucky using the select tool.17 Note how all the other selected records and images become deselected. Clear all selections by picking "Select None" in the Edit menu.

Other Cool Table Operations

Several other operations may be done on tables. A few examples follow.

{__ } Make sure that Attributes of Cty2m is the active window. Click on the attribute heading "Cnty_name." Note that it is highlighted: the black text is changed to white. From the Field menu, pick "Sort Ascending." Look at the effect on the table. (Note how many Virginia records there are in the "State_name" column, all with the same county name. Later in the exercises you will find out why.)

{_} Select all the counties of Tennessee: Begin to "build a query" either by picking the query-building tool (it looks like a hammer) or picking "Query" from the "Table" menu. A window appears which contains "Fields" (attribute names), "Values" (attribute elements), and operators such as ">=" and "not." The goal is to type or build the expression: ([State_name] = "Tennessee"). You could type it, but by double-clicking on the fields and values, and single-clicking on the operators, you can construct this expression. Once it is the way you want it, click on "New Set." The rows in the table that represent Tennessee counties will turn yellow. The graphic representation, "View1," will also show all Tennessee counties as yellow.

{__ } Promote the selected rows to the top of the table. Page down through the table. Note that all the Tennessee records are at the top.

{_} Use "Query" again to add Fayette county Kentucky to the selected set: Use the delete key and/or the backspace key to remove the previous expression. Start with the paired parentheses and build the query ([Cnty_name] = "Fayette"). Instead of New Set, pick Add to Set. Promote the selected counties and examine the table, noting that it now includes Fayette County Kentucky. Dismiss the query building window.

{_} Demonstrate the importance of having the correct theme active when you wish to work on it: Make Lak2m the active theme. Under the "Theme" menu, pick "Clear Selected Features." Nothing happens, because no features of Lak2m are selected. Now make Cty2m the active theme. Again clear selected features. This time Fayette county and the Tennessee counties are deselected.

{_} Save the project. By this time you have seen a lot of ArcView — but there is much, much more. If you want to learn a bit more about it, including how it can be used to make thematic maps, do the exercises below.

Exercises

Exercise 5-1: The route from Lexington to Knoxville requires crossing the Kentucky River at Clays Ferry. Due to the volume of traffic, the two-car ferry was replaced some time ago; today a six lane bridge—part of Interstate 75—handles the traffic. That bridge is several hundred feet above the river.

Displacement of bridge spans in orthophoto due to altitude differences.

Figure 5-10. Displacement of bridge spans in orthophoto due to altitude differences.

A GPS track across the bridge is not congruent with the bridge span, as you will see if you do the following:

{__} Make a new view: View2. In_:\GPS2GIS \Clays_Ferry\ you will find an image: CLAYS_FERRY.TIF. Add that as a theme and turn it on. Maximize ArcView. Maximize View2. Locate the bridge and zoom up on it, showing primarily the bridge and some highway at each end. Note that the bridge seems to bend toward the southwest.

{__ } In the same folder you will also find Clays_Ferry.shp, which is the corrected GPS track of point representing fixes taken by a car crossing the bridge from the northwest to southeast, with a GeoExplorer taking "ALL" points. Add that as a theme as well. Make its legend a bright yellow circle of size 8 and turn it on. The result should appear as in Figure 5—10. Notice that the track of GPS fixes starts off with the car not only on the Interstate but in the right lane. As the car enters the bridge, however, it seems to depart from the roadway, cross over to the northbound span, and then return to its original roadway. The data are accurate to two meters. Can you explain this phenomenon?

Exercise 5-2: By using the ability to sort records we can obtain different types of information.

{__ } With the Cty2m table active, use the query builder to select all the records containing "Virginia" as the "State_name." Promote them. Why does the one county have so many records? (Hint: In the view, zoom to the selected features.)_.

{__ } Clear the selected set.

{__ } Make a new set by selecting all Kentucky counties in the table. Notice that 121 records are selected, corresponding to 121 polygons. But Kentucky has only 120 counties, so one county must consist of two polygons. Can you find which one?_. Select only those two polygons. Zoom to them. That county used to be one polygon before the Mississippi River changed its course.

{__ } Clear the selected set.

Exercise 5-3: Arc View can generate thematic maps—maps that represent the value of some variable by shading or coloring polygons differently. The values used may be taken from a table for the theme. In this exercise you will use the attribute (field) named "Cnty_unemp," to make a thematic map showing the unemployment rate in the counties.

{__ } Expand the View window so it is wider but not so tall. Do the same with the Table window. Select the counties of Kentucky from the table. Zoom to selected features. Clear selected features.

{_} Turn off all themes except Cty2m.

{_} Make the view active. With the Cty2m theme active, edit its legend (Theme ~ Edit Legend). The "Theme" will indicate Cty2m. As the legend type, choose Unique Value. Make the Values Field show "Cnty_unemp." When you do this, the "Legend Editor" will indicate a number of areal symbols, each with a value or range of values beside it. A degree of unemployment for the counties is given by a value ranging from 0 (no data) to 6 (high unemployment). Click apply and look at the map. To use colors other than those chosen by ArcView, click Fruits and Vegetables under color schemes and apply. An ugly map appears, with counties shown in wildly different colors. While you could determine the unemployment value in each county by look ing at the legend, you don’t get an intuitive idea of the progression of the values.

{__ } Try a different approach. Suppose you want to assign the "color" clear to the zero values (which appear in the field for states other than Kentucky). You want a light color for counties with a value of "1" for "Cnty_unemp." And you want the color to get increasingly darker for counties with higher unemployment. To do this, choose Graduated Color for the Legend Type; pick Beige to Brown for the color ramp. Apply. This almost gives us what we want.

{__ } Note that there are seven categories of unemployment (designated as 0 through 6), but only five symbols are being used. Rather than combine some categories, as has happened, you may want to have a symbol for each category. Click "Classify" to bring up a Classification window. Make the Type "Natural Breaks." Change the number of classes to seven. Apply.

{__ } To make the zero values show up clear, first double-click on the topmost areal symbol (next to the zero). Regardless of whatever pallet comes up, change to the Fill Pallet. Then assign the "clear" value by clicking on the clear square (upper left). Apply. A map should appear which shows a progression of colors based on the value of the "Cnty_unemp" field. The counties of other states should appear as clear.

{_} Change the background color to black: View ~

Properties ~ Select Color and pick Black.

If the map looks the way you want it, dismiss the legend editor.

If you want a real map, you can make a "Layout" in Arc View— complete with north arrow, border, scale bar, and so on. Besides this, Arc View has many, many more features and capabilities than have been shown here. This is beyond our scope here. Contact ESRI (www.esri.com) for information on Arc View.

Exercise 5-4: You can use the GPS track to evaluate the accuracy of the ArcUSA roads database.

{__ } Dismiss the Cty2m attributes table. Zoom to the extent of the GPS track.

{__ } Add the ArcUSA coverage RDS2M as a theme. (You will find it in the _: \ GPS2 GIS \ LEX_KNOX\ ARCUSA\ARCUSA_D \USA_2MG directory.) Edit the legend so it shows up in medium purple, with a linear symbol—one is available which even looks a bit like a road with a dividing median. Make it of width 3.

{_} With the Query Builder, select the records that relate to Interstate 75: Bring up the table for Rds2m. The "I-75" designation usually shows up in the table as a "75" in the field "Inter_rte1." But sometimes the same stretch of highway goes by two different names. When I-75 is in common with another interstate highway designation, the "75" may appear in the table under the heading "Inter_rte2." To get all of I-75 you must include both column headings in your selection process. (Hint1: Use the "or" operator.) (Hint2: Or use "Add To Set.")

{__ } Make sure that the distance units for the view are in kilometers. (View ~ Properties ~ Distance Units.)

{__ } Zoom up and pan along the route to see how closely the GPS track corresponds to the selected segments of I-75, particularly in the Kentucky county just north of the Kentucky-Tennessee border. Measure the greatest distance from the GPS track to the interstate. It is ____________kilometers.

{__} Add the theme \GPS2GIS\LEX_KNOX\EXPORT \R090317A to the view. This is a GPS track based on fixes from a different receiver on the same trip as that which recorded I090317A. The GPS points from this second receiver were converted to an ArcInfo line coverage (rather than a shapefile). Make it a bright blue line of size 3.0. Ensure that I090317a.shp is painted on top of it.

Notice that the two GPS tracks seem to be almost congruent, whereas the representation of I-75 only roughly parallels them. Given the published accuracy of ArcUSA, a question which occurs is: Where is the interstate more than 1792 meters away from the GPS track? You can find this out by making the point-based GPS track active and then selecting those points of the GPS track which are within 1792 meters of I-75, which is the selected part of Rds2m.

{_} Make I090317a.shp the active theme. (Leave I-75 selected from the Rds2m database; it should still appear in yellow.) Pick "Select By Theme" from the "Theme" menu. You want to select the features of the active theme that are within a distance of 1.792 kilometers of the selected features of Rds2m. Make a new set of these features.

The dots that remain red are those which are not selected, and are therefore outside the 1792 meter average accuracy distance.

{__} Zoom to the I090317a.shp theme. Get the GPS track table.

How many of the points were selected? _____ . "Switch Selected"; how many are selected now? What percentage of the points were further away than the average accuracy?

This is not a completely fair assessment, however. At the end of trip the car departed from I-75 and took other roads. So, as a final task, you will graphically select those GPS fixes that were not taken on I—75.

{__ } Switch the selected points so that the red dots indicate those fixes that are more than 1728 meters away. That is, the yellow dots show the selected fixes that are okay. You want to add to the selected set. Make sure I090317a.shp is the active theme. Make the view active. Zoom up on the southern end of the trip. Pick the "Select Feature" tool. Hold down the shift key (since you are adding to the selected set) and drag a box around the last set of red dots. When you release the mouse button those dots should turn yellow. Now the calculation of the percentage of points that were further away from the mapped version of the Interstate will be more accurate.

Next post:

Previous post: