Exercise 3: Adding Themes to Views & Legend Editing


Syllabus | Schedule of Classes and Assignments | Class Meetings | Contact Us

Objectives:


Adding Themes to Views

Legend Editing


Adding themes to views

Create a personal directory
Start ArcView
Open the Startup Project
Set working directory for a project
Add feature themes to the view
Delete feature themes from the view
Open a theme attribute table
Rename the view
Add an image theme to the view
Add a CAD theme to a view
Add an event theme to a view
Save and close the project


Create a personal directory

  1. Place your Zip disk in the Zip drive.

  2. Open a Windows Explorer and create a new directory in the root directory for the Zip drive. Give the directory a name that means something to you, that you will recognize later. Avoid names like myfile, GIS, or project.

  3. For this exercise, call the new directory view_basics.




    IMPORTANT NOTE: As a habit to get into, NEVER, NEVER, NEVER create directories that have spaces, dots, or other special (non-alphanumeric) characters in the directory name, or ANYWHERE in the path name for the directory. You will save yourself much grief later. Instead of spaces, use underscores ("_").

 

You have just created a personal directory that will be used to for saving projects and data. Get into the habit of creating a new directory for each project or assignment. Making new directories will make it much easier to manage your data. Once you have completed an exercise or an assignment, you can delete the files from your Zip disk, or back the files up to a CD for later use. You should be able to find CDs for about $1.00 apiece (in 20 or 50 packs) at Office Max or Costco. That $1.00 backup may save you many hours of work if you find you have made mistakes.

 


Start ArcView

  1. The location of the ArcView shortcut may vary from system to system. It should be in a path similar to this:



  2. During the first lab session, you will be shown where the ArcView executable is on the computers in the lab.

  3. When ArcView opens, it will start with a single window (the Project Window, with the Untitled title bar) containing a few icons, a few menu choices, and a few buttons.


 


Open the Startup Project

  1. Make sure that the data CD is in the CD drive, and your Zip disk is in the Zip drive.

  2. From ArcView's File menu, select Open Project.

  3. Navigate to the CD (note to change drives, use the Drives: dropdown list at the lower right of the Open Project dialog), and select the cfr250.apr project file.



  4. When the project opens, you will first be prompted to enter the drive letter of your Zip drive:



    Enter the drive letter for the Zip drive. If you enter the wrong drive letter, your projects may not function properly.

    If you do not know the drive letter, check a Windows Explorer. The Zip drive will be shown as "Removable Disk."

    You will see a dialog box telling you what drive letter the Zip drive is.



    Click the OK button.

  5. A dialog will open asking if you want to open an existing project.




    Select No.

  6. Another dialog will show that you are clear to build a project



  7. You will be prompted to save the project. Always choose a descriptive name for projects. For this exercise, call the project view_basics_1.apr. The project will automatically be saved to your Zip drive.



  8. The only window you will see inside the ArcView application will be the Project Window. The Views icon will be active.




  9. Click the New button (or double-click the Views icon) to create a new, empty view. The view will be called View1.

 

You have just created a new (empty) project and added a new (empty) view to the project. You will perform this set of tasks time and time again as you work with ArcView. While in this course, always use the cfr250.apr from the CD. The startup project establishes some useful settings, such as automatically specifying the Working Directory, and also makes it easier when moving projects between computers.

 


Set the working directory

The working directory is the default file space where new files will be stored. Especially when you create a large number of files, setting the working directory early will save much work later. Always make it one of your first steps to set the working directory to your zip disk.

  1. To set the working directory for your project, make the View window active, and from the menu, select File > Set Working Directory.

  2. If you are using the startup project from the CD, you should see that the Working Directory is set to the root of your Zip drive:



  3. Type in the path to the directory you just created. Now new data sets will by default be saved in this directory. You will need to be familiar with the DOS/Windows nomenclature for drive and directory specifications. The following example means "Drive E, directory view_basics." Don't copy this without thinking! Make sure you set the Working Directory to the correct drive!




    If the directory you specify does not exist, ArcView will complain.




    In this case, you need to either create the directory, or specify a different directory for the Working Directory.

 

You have just set the working directory for the project . All new files created for the project will by default be placed in the working directory. If you do not set the working directory, new files will by default be placed in C:\temp. You should always set the working directory to save time later. If you do not set the working directory, you will need to navigate the file system each and every time you want to save files elsewhere than C:\temp.

The other reason you should set the working directory to your Zip disk is so that if you move to a different machine, your project will still be able to find its files.

 


Add feature themes to the view

  1. Click the Add Theme button to add a new theme to the view.

  2. Navigate to the directory \packgis\forest on the CD drive (note that the drive letter for the CD drive may be different from what you see in these examples).

    By default, the Data Source Types dropdown list is set to Feature Data Source. With this choice active, you will see feature (vector) data sources listed. If the CAD extension is active, you will also see CAD data sources available. If you select Image Data Source, you will see a list of image (raster) data sources. If other extensions are loaded, you may see additional choices for Data Source Types.



  3. Click the pls_corner file and then click the OK button (or simply double-click on the file name). The shapefile theme will be added to the view and assigned a random color (i.e., the color of your point markers may be different than those shown here).

  4. Click the check box in the Table of Contents.



  5. Next, add the boundary theme to the view (use the Add Theme button ).

  6. Single click the folder to the left of the file name. You will see that the boundary data source is composed of polygon, arc, labelpoint, and node features. Double-click on polygon to add the polygon feature theme to the view. This will also be assigned a random color.



  7. Click the check box to turn this theme on. Note that the boundary polygon obscures the section corners.

  8. Click and drag the boundary theme below Pls_corner in the Table of Contents to alter the drawing order.



  9. Now add the themes roads and streams to the view. To select multiple themes in the Add Theme dialog, click on one data source name, and with the the <Shift> key depressed, click each successive data source. The <Shift> key is used any time you want to make multiple selections of objects in ArcView.



  10. Turn these themes on as well.

 

You have just added a few different spatial data sources to a view. You have altered drawing order so that polygons do not obscure points and lines.

Once data sources are added to views, they are known as themes.

 


Delete feature themes from the view

 

  1. Add the soils theme to the view, using the same technique as before.

  2. Turn on the soils theme. Note that newly added themes are always placed at the top of the Table of Contents, and they frequently need to be moved in the drawing order.

  3. Make the soils theme active (single click the theme's name in the Table of Contents; you will see the theme's legend appear raised or "chiseled").

  4. From the Edit menu, select Delete Themes.

  5. You will be asked for verification.




    Click the Yes button to delete the theme from the view. If you did not have the soils theme active, you will be asked for verification of deletion for a different theme. If this is the case, click No.

 

Use this technique to delete themes from views. There is no "undo" for deleting a theme. Once a theme has been deleted from the view, it will need to be added back manually. Also, any legend changes for the theme will need to be recreated. Deleting a theme from a view does not delete it from the disk, unless it is a temporary theme, which we will not deal with until we get into Grid data sets in raster analysis.

When you delete themes, make sure that the theme you want to delete is the active theme, or you may inadvertently delete the wrong theme. If you have multiple themes active, you will be asked if you want to delete individual themes or all active themes.

 


Open a theme attribute table

Each feature data theme that is added to the view will also be accompanied by a theme table.

  1. To open a the roads theme's attribute table, make the theme active, and click the Open Theme Table button . The theme attribute table, Attributes of Roads, will open. You can tell at a glance which tables in the project are theme tables (as opposed to stand-alone tables), because they are always named "Attributes of ...."



  2. Each road segment in the theme is related to a record in this table. You can scroll left and right or up and down to view more fields or records. We will cover tables in depth later in the course.

 

You have just opened the theme attribute table for a feature theme. All feature themes (point, line, and polygon) have theme tables. Each feature in a theme has an associated record in the theme table, and conversely, each record in a theme table has an associated spatial feature.

 


Rename the view

  1. To change the view's name, make the view active and open the View Properties dialog by selecting View > Properties from the menu.



  2. In the Name text control, highlight View1 and type in V Pack Forest, then click the OK button. The view will now be titled V Pack Forest in the view's menu bar and in the project window.

 

You have just altered the name for a view. You should get in the habit of naming views when it is important to tell the difference among different views by name. It is difficult to remember what data are loaded into views called View1, View2, and View3.

As an additional hint, you can prepend the name of different documents with the first initial of the document type. In this example, if you name the view V Pack Forest, you can easily tell the view by name when you look at Window in the menu. ArcView does not enforce unique names for different documents in a project; you could simultaneously have several views, tables, layouts, and scripts, each called Pack Forest. Using some kind of naming convention will help you keep these various documents in order.

 


Add an image theme to the view

Images can be displayed in views. Some common images used in geographic views are satellite images, digital orthophotos, and scanned maps. In order for these images to "fit" with other geographic data, they must be accompanied by a world file, which is an ASCII file that determines pixel size, location, and skew angles. Each of the parameters in the world file are expressed in real-world coordinates. Without a world file, and image cannot be placed in geographically referenced views. If you look at the CD's directory structure, you will see world files accompanying each image file.

  1. First, create a new view.

  2. Add a new theme ().

  3. Make sure that the Data Source Types dropdown (in the lower left of the Add Theme dialog) is set to Image Data Source.

  4. Add the \packgis\forest\ortho_91.bil and the ortho_96.bil themes (remember to use the <Shift> key).

  5. Also add the feature theme \packgis\forest\stands, but only add the the arc feature type. (Make sure to switch Data Source Types back to Feature Data Source before you attempt to add this theme.)

    Make sure you single click on the folder to the left of the stands data source to get a dropdown list of feature types. If you do not open the folder and select the arc feature type, you will load the polygon feature type.

    If you have gone into the stands folder, you did not reset Data Source Types back to Feature Data Source. In this case, you have gone too far into the directory structure. If this is so, you will not see any data sets listed. Move back up into the forest folder. Why? ArcInfo data sets are stored in individual directories; but the individual files in these directories are non-functional. ArcView will see the ArcInfo coverage directories as theme data sources, therefore you need to be at the parent directory level of the coverages in order to "see" these as data sources. We will cover this problematic directory structure later in the course.

  6. Make sure that the ortho_91.bil and ortho_96.bil themes are below the stands theme in the Table of Contents, and turn all themes on.

  7. Zoom in to a smaller area of the view by selecting the Zoom In tool and dragging a rectangular area. Your view will look similar to this, though your line color may differ:



    Experiment with the different years of data by turning themes on and off. Note the difference in image quality as well as the difference in vegetation over the 5 year period.



  8. Now zoom back to the full extent by clicking the Zoom to Full Extent button .

 

You have just added image themes to a view and overlaid arc features of a polygon data set. Using different data sets stored in the same coordinate space allows you to see the relationships among different data.

 


Add a CAD theme to a view

  1. In order to load CAD feature themes to views, you must first enable the CAD Reader extension.

  2. Make the Project window active and select File > Extensions from the menu.

  3. Click the check box next to CAD Reader, and click OK. If you click on the name of the extension, you will see a description in the About: box, but you still need to click the check box in order to activate the extension.

    this: is not the same as this:

  4. Make V Pack Forest active, and add the line feature theme from the data source \packgis\archive\e-10a.dxf. Turn the e-10a.dxf theme on in the view. You will notice that the new theme does not display.

  5. Move the cursor around in the view, and make a mental note the coordinates displayed in the upper-left of the Application Window. These are State Plane coordinates, measured in feet, somewhere in the range of 1,200,000 (x), 550,000 (y).

  6. Zoom to the full extent of the view (), and you will see that some of the data display in a small area.




    This may seem confusing, but it is a critical part of understanding how ArcView handles display of spatial data.
    The features that are visible in the upper right are the themes you added initially, which are all stored in State Plane feet.
    The CAD theme features are located in the lower left of the view, but the magnitude of coordinates of the CAD theme features makes them too small to see.

    Why? This is because the view represents a simple coordinate plane. ArcView displays data according to internally-stored spatial coordinates, which are an inherent part of the spatial data sources. The data are placed on a simple Cartesian plane according to their internal storage coordinates.

    The CAD drawing was prepared with coordinates specified in page units and coordinates, rather than in real-world units and coordinates.

    If you make the CAD theme active and zoom to its extent (click on the name of the theme in the Table of Contents and then click the Zoom to Active Themes button ), and then move your pointer around the view, you will notice coordinates in the range of 0-30, which are page units, rather than the range you saw before with State Plane coordinates. This is a typical situation when you have multiple different data sets from different sources. Some of your data may be in one coordinate system, while others are in a different coordinate system.




    If you do have CAD data sets, you should find out what coordinate system and units they are stored in. If you ever have input on the development of CAD data sets, make sure to specify that the data should be stored in a system that matches your data.

  7. Delete the E-10a.dxf theme by making the theme active, then selecting Edit > Delete Themes from the menu. Confirm the deletion when asked to do so.

  8. Zoom back to full extent.


    Important Note: Use this technique whenever multiple data sets do not appear to display simultaneously. Even if you have multiple data sets for the same ground area, the data sets may be in different projections or coordinate space. If the data do not share the same coordinate space, you will see a large area of white space and just a few dots of color where the data lie on the coordinate plane.

    It is absolutely essential that you know the projection and coordinate system parameters for any and all data you use in a GIS. These topics will be covered in detail later in the course.

 

You have just enabled the CAD reader extension for adding CAD data sources to views. CAD drawings can be important data sources, depending on the industry you are working in.

You have also learned the technique that allows you to tell if several data sets are incompatible in coordinate or projection properties.

 


Add an event theme to a view

If you have ASCII coordinate data for point features, you can import them into ArcView. The data need to be in tab- or comma-delimited form, with the .txt file extension.

  1. Download the stand_label.txt file and place it in your personal directory. You may need to right-click on the hyperlink and select a "Save Link/Target As" option.

  2. Make View1 active.

  3. Click the Tables icon in the Project window and then click the Add button.

  4. Select Delimited Text from the List Files of Type dropdown, and add the text file that you just downloaded. Make a mental note that there are only 3 different tabular data source file types for ArcView when adding tables from system files.



  5. The table will be added to the project.



  6. Make the view active.

  7. Create an event theme from the table by selecting View > Add Event Theme from the menu.



  8. Select the same text file that was added in the previous step. The X and Y fields will automatically be set. Click OK. A new theme will be added to the view, with the name of the text file.

  9. Zoom back to full extent () and then turn the new theme on. This theme represents the label points for the stands polygon theme.

 

You have just added an event theme to a view. Use this technique to convert simple point coordinate tabular data into explicitly spatial feature themes.

 


Save and close the project

  1. To save the project, select File > Save Project As from the menu.

  2. Navigate to your personal directory, and save the project as view_basics_1.apr.

  3. Switch to the Project window and, select File > Close Project from the menu. Do not close ArcView.


Legend Editing

Start ArcView and open a project
Change the symbol color and legend type
Classify stand age values using natural breaks
Change the classification type, the number of classes, and labels
Create a dot density map
Display values with chart symbols
Use graduated symbols to display points

 


Start ArcView and open a project

Retrieve the project view_basics_2.apr. When you open the project, you will see the active Pack Forest view , containing the stands theme.

 


Change the symbol color and legend type

When a theme is added to a view, ArcView assigns a single random color to all features of that theme. Usually, you will want to alter the symbolization of themes. This is done by altering the legend.

  1. First, change the basic color of the theme, using the Legend Editor. To open the Legend Editor, either

    1. double-click the theme name in the Table of Contents,

    2. select Theme > Edit Legend from the view menu, or

    3. click the Edit Legend button .


  2. When the Legend Editor opens, double-click on the symbol. This will open the Fill Palette.



  3. To change the color, click the Color Palette button .

  4. When the Color Palette opens, click on a different color for the Foreground option, and then dismiss the Color Palette.

  5. Click the Apply button on the Legend Editor, and the changes will be applied. Any time you make changes to the legend, you must click the Apply button. You will see the new color applied to each polygon in the theme.



    Next, change the legend so that each stand is displayed in its own color:

  6. Open the Legend Editor again, and then select Unique Value from the Legend Type dropdown.

  7. Select Unit_name from the Values field dropdown.

  8. Select Equatorial Rainforest from the Color Schemes dropdown, then click Apply.

  9. Dismiss the Legend Editor and any Symbol Palettes. Each stand is now symbolized with its own color. Your display may look different from this, based on how the colors are assigned to each polygon, but the color scheme should look similar.

 

You have just made a simple alteration to the legend for a theme. Changing legends is the main way to alter what you want to communicate to the map reader. We will work more on altering legends throughout the course.

 


Classify stand age values using natural breaks

Now we will experiment with different classification methods.

  1. First, classify stands by natural breaks in the age data. Open the Legend Editor, and select Graduated Color from the Legend Type dropdown.

  2. For the Classification Field, select Age_1999 (near the bottom of the list of fields).

  3. Select Chartreuse monochromatic from the Color Ramps dropdown, Apply the change, and then dismiss the Legend Editor.






    By default, ArcView breaks the data into 5 classes, with class boundaries at "natural breaks." The darker green the stand is, the older it is.

  4. Next, let's look at normalization in classification of data. Open the USA view, which displays each state in a unique color.

  5. First, classify the states by their population in 1997 (Legend Type = Graduated Color; Classification Field = Pop1997), with the Yellow to Orange to Red color ramp.






    This map shows the gross population of each state. However, some of the states, most notably, California and Texas, show very high populations. But anyone who has ever visited California or Texas knows that there are vast areas with very small population. What may tell a better story is population density, or the number of people per unit of ground area. If we normalize the population data (that is, divide the state population by state area), we will get population density rather than gross, overall population.

  6. Select Area in the Normalize by dropdown. To preserve the same color scheme, you will also need to select the Yellow to Orange to Red color ramp.





    Note how now Texas and California show far lower population density, whereas the Eastern Seaboard shows higher population density. Depending on what you want to communicate, you will choose various methods of classifying and normalizing data.

 

You have just altered the legend of a theme and normalized the classification. This technique allows you to compare relative or proportional values of attributes among different features.

 


Change the classification type, the number of classes, and labels

  1. Close the USA view and go back to the Pack Forest view. We will divide the forest into 3 classes of stands: young, mature, and old.

  2. Open the Legend Editor for the stands theme, and select the Graduated Color legend type.

  3. Click the Classify button, and choose 3 as the Number of classes. Click OK to accept the number of classes.

  4. In the Legend Editor, choose the Green monochromatic Color Ramp.

  5. Edit each of the Value fields in the Legend Editor, to create 3 new class values (0-60, 61-100, 101-199). Also edit the Label fields for each class (young, mature, and old).



  6. Apply the change in the Legend Editor.



    The stands are now classified into 3 distinct classes, and the view shows the classes labeled as young, mature, and old. This type of map is better at reaching a large audience with less technical knowledge than the previous forest map.

 

You have just created a custom classification of a feature theme. You can use this technique to divide or lump features into specific classes for the purpose of communicating specific things about your data.

 


Create a dot density map

  1. Close the Pack Forest view and re-open the USA view.

  2. Open the Legend Editor for the states.shp theme and select Dot as the Legend Type. Select No_farms87 (number of farms per state in 1987) as the Density Field.

  3. Click the Calculate button, and then Apply the change and dismiss the Legend Editor. MAKE SURE you click the Calculate button, or it may take several minutes to draw. Your Dot Legend may or may not be 1 dot = 3000; the value is automatically calculated by the data values and the scale of the view.



  4. The map should appear like this, with the higher-volume sampling cells represented with more dots. Notice that the largest number of farms per state is clustered in the states south of the Great Lakes.



  5. Alter the dot density map so that the normalization uses the field Pop1990. Make sure to click the Calculate button to reset the dot legend.



    The first dot density map (gross density) shows that the greatest total number of farms are located south of the Great Lakes, but the second dot density map (density per capita) shows the distribution of farms per capita is shifted to the northwest.

  6. Next, add another copy of the states.shp theme to the view. to do this, makes the states.shp theme active, and select Edit > Copy Themes and then Edit > Paste from the menu.

  7. Change the copied theme's legend to Graduated Color (5 classes) based on the values in the Hispanic field, normalize by Area, and choose the Chartreuse monochromatic color ramp. This shows the population density of Hispanics.

  8. Make sure the themes are displayed in the correct order so that the points appear on top of the polygons.



    What does this tell you about the common perception that Hispanic migrant workers dominate the farming industry? Where is the greatest concentration of farms per capita, and where is the greatest concentration of people of Hispanic ancestry? How might this map be misleading or incomplete? Do you think this map shows anything related to reality? Can you alter this map so that is communicates something different? Do you think the source data are accurate? Note that the states.shp theme does not include a field for the average number of workers per farm, or average size of farm.

 

You have just created a dot density map and compared it with a graduated color (choropleth) map. Beware of dot density maps, because the dots do not represent actual locations of features. Try turning the theme on and off, and you will see that the dots change location, but always the same number of dots are shown in each state.

 


Display values with chart symbols

  1. Delete the dot density theme, and open the legend editor for the polygon states.shp theme.

  2. Select Chart as the Legend Type. Keeping the Shift key pressed, click the White, Black, Ameri_es, Asian_pi, Other, and Hispanic fields, and click the Add button. This will place these 6 fields in the pie chart symbol. Alter the symbols (double-click on the shade symbol) for each ethnic group with colors that have meaning to you. Alter the Background Symbol to a neutral color.



  3. Next, click the Properties button and change the Size Field to Pop90_sqmi, a field representing population density. Also change Minimum and Maximum Size controls to 10 and 20, respectively. OK the properties dialog, and Apply the change.




    The view will now display pie charts for each state. The relative proportion of each ethnic group is represented by each pie slice. The overall size of the pie is proportional to the population density per state.




  4. Zoom in to get a better picture of individual states. Note how the overall proportion of ethnic minorities changes from state to state, as well as how the relative proportion of each minority group compares within each state. These type of maps have a tremendous amount of information to communicate in a compact and easy to understand format.

 

You have just created a map with chart symbols. These type of maps can convey a large amount of information in a concise format.

 


Use graduated symbols to display points

Displaying points in different sizes relative to an attribute value can be an effective and efficient communication tool. We will display USA cities according to the median income per city.

  1. Change the legend type for States back to single symbol

  2. Open the USA view, and add the theme \esridata\usa\cities.shp from the CD.

  3. Open the Legend editor for that theme and choose Graduated Symbol as the Legend Type dropdown.

  4. In the Classification Field dropdown, choose Median_val. The data will be classified into 5 groups (natural breaks, by default), and the symbols will be scaled in size according to the value of the attribute for each feature.




    At this scale, it is difficult to see the difference among cities, but it is possible to see that the median home value in the cities of south Florida or southern California is much greater than that of the cities of North Dakota or Montana.

    You may be more familiar with the local area, so zoom into the Puget Sound region.

  5. Next, change the symbol used to draw these features. Double-click the Symbol in the lower-left of the Legend Editor, which opens the Marker Palette.

  6. Click the Font button, which will display a list of TrueType fonts loaded on the system.

  7. Scroll down to ESRI Cartography, and click the Create Markers button. This will convert the TrueType font to marker symbols within the current project.



  8. Now scroll back up and select the font Arial 9 Normal. This sets the default font back to Arial.



  9. Next, click the Marker button for the Marker Palette, and then scroll down near the bottom of the list, and click the marker resembling a house.



    Close the Marker Palette, and Apply the change to the Legend Editor. You should see cities displayed with the new house symbol.

  10. To label the cities with their names, select Theme > Auto Label from the menu.

  11. If the Label field does not show City_name, select it from the pulldown menu.



    Use the <F1> key at this time to to display the help topic for the Auto-label tool, so you will know what the various settings do.

  12. Click the radio button for Find Best Label Placement.
    Make sure to click the check boxes for Scale Labels and Label Features Only in View Extent, and click OK.




    Now you can see the cities in our region displayed in markers representing the median value for houses, along with place names.

    Where do you want to live? Where can you afford to live?

 

You have just displayed a point theme in a graduated-size, custom symbol. This technique can be used if you want to communicate something about your point locations in a way that makes visual "sense." You have also learned to label point features with a specific attribute value.

 


Syllabus | Schedule of Classes and Assignments | Class Meetings | Contact Us

UW-CFR250 © Philip M. Hurvitz, 1999-2000. All Rights Reserved.