Working with Shapefiles, Tables, and

Grids in ArcView 3.x


Working with Shapefiles

1. There are three types of vector data as shapefiles:

·  Polygons (Area based features such as watersheds and soils data)

·  Points (well locations and stream gages)

·  Lines (Roads, Rivers, etc.)

2. Getting Started with ArcView

·  Click on Start àPrograms àESRI àArcView 3.x (particular installations may vary)

·  Check “as a blank project” and click OK

·  Make sure the “view” is highlighted.

·  Click on the New button.

3. Adding Shapefiles to the View

·  There are two ways to add shapefiles to the view:

View Menu à Add Theme

OR

The Add Theme Button (looks like a plus “+” sign)

·  Browse to themes and select them with the mouse

·  To add multiple themes simultaneously, hold down the shift key.

·  Click OK

·  For this example add the following list of themes from the esri\esridata\usa:

·  states.shp (polygon)

·  rivers.shp (line)

·  lakes.shp (polygon)

·  cities.shp (point)

4.  Turning Shapefiles On and Off

·  Turn on or off the visibility of a theme by checking the box next to the theme’s name.

5.  Zooming In and Out

·  Zooming in and out and panning are common tasks in the view.

·  Click the “Zoom In” button to zoom in on the center of the view. This button can be used repeatedly to keep zooming in.

·  Click the “Zoom Out” button to zoom out from the center of the view.

· 
Click on the “Zoom In” tool. Then click and drag a box in the view with the left mouse button to designate the extent to which you want to zoom.

·  Click the “Zoom to Full Extent” button to zoom out so all information is visible again.

6. Color and Display of Shapefiles

·  Arcview selects a color scheme for each shapefile that you bring in.

·  To best display multiple shapefiles, you may wish to change the colors of the files.

·  Further, a theme may have gradients of information that you wish display

·  To change the color and display of a shapefile:

o  Double click on the theme you wish to change. (or Theme à edit legend)

o  The “Legend Editor” will appear.

o  Double click on the colored Symbol box, and the

o  fill palette will appear.

·  Click on the paintbrush button.

·  Select a color by single clicking on your selection.

·  Click Apply on the legend editor.

·  Close the editor when finished

7. Changing the Fill Pattern of a Shapefile

·  Notice also that there are different fill patterns that can be used in your map display.

·  Make sure that the fill button is depressed on the fill palette.

·  In the fill palette, select your choice of fills.

·  Select an “empty fill,” with an outline of 2.0 for the states theme.

·  To change the color of an outline, follow the procedure above, making sure that outline is selected in the Color drop down box.

·  Experiment with the colors and fill patterns for the various themes.

·  Polygons have fill patterns with foreground, background and outline colors. They also have outline thickness.

·  Lines only have foreground colors. They also have line thickness.

·  Points also only have foreground color, but have marker size.

·  Various line and marker styles are available for the line and point themes respectively

·  Select Apply on the Legend Editor to apply any changes.

8. Displaying Graduated Colors in a Theme

·  Double Click on a Theme’s name.

·  For this exercise, select states.

·  In the Legend Editor, select “Graduated Color” under the Legend Type.

·  Select a variable under the “Classification Field”.

·  Click Classify, select your preferred method of display under the “Type” drop down menu as well as the number of classes desired and click OK.

9. Renaming Shapefiles in the View

·  Themes can be given any name that you wish.

·  By default, a theme is named after the data source it represents, such as “States.shp.”

·  You can give themes different/more descriptive names without worrying that you are changing the shapefile’s file name – it is simply an alias stored in the ArcView project.

·  First, make the shapefile that you wish to rename ‘active.’

o  Single click on the theme name in the view window.

o  The theme will appear to be raised.

·  Click the Theme menu.

o  Select Properties

·  In the “Theme Name” box type in the name of your choice.

·  For example, States.shp can be named States by highlighting the name and typing over it, or by using typical text deletion procedures.

·  Below, see an example of all renamed themes.

10. Creating New Shapefiles from existing Shapefiles

·  A new shapefile can be created from an existing shapefile or from a partial selection of a theme or table.

·  Make your existing theme active (it will appear to be raised).

·  Select the areas, lines, or points using the “Select Feature” button that you wish to use to create a new theme.

·  Use the Theme menu à Convert to Shapefile from the view window

·  Choose a location and a name for your new theme.

·  To add the theme to the current view, click the Yes option.

Working with Tables

1.  Opening Tables

·  Clicking on the “Open Theme Tables” button will open the currently active theme’s attribute table.

2. Table Properties

·  It is possible within ArcView to determine which of the variables you want to be displayed when the table is open.

·  With the table open, click on the Tables à Properties.

·  By turning off the checks, you can turn off a variable in the table display.

· 

·  The name of the table is displayed in the “Title” box (which can be edited as needed).

·  There are spaces for additional information relating to the table such as creation date, creator (author) and even space for comments regarding the data table.

·  An alias can be typed in the box to the right of the field name.

3. Selecting Variables in a Table

·  Turn on the states and cities themes.

·  Open the cities Table.

·  With the arrow button depressed, select multiple points by holding the shift key down and by clicking on the row (see below).

·  To deselect variables, click on the “Select None” button. Or Edit à Select None.

4. Selecting Variables with Particular Value Ranges

·  Begin by highlighting the column name for elevation.

·  Click the “Sort Descending” Button.

·  Select the highest few cities.

4. Creating a Shapefile from the Table Selection

·  A new shapefile can be created by selecting part of a table.

·  Make the View active.

o  The top of the view will be blue.

·  As before, use the Theme menu à Convert to Shapefile

·  Choose a location and a name for your new theme.

·  To add the theme to the current view, click the Yes option.

·  You may want to close the table at this point

·  Turn on the new theme, rename it, and change its color if you like.

5. Adding a Table to the Project window

·  Make the Project Window Active.

·  Select Tables and then click on the Add Button.

·  Select the counties.dbf table.

·  Click OK.

6. Joining Tables

·  Make the View Window active (top of view window turns blue).

·  Make your existing states theme active (it will appear to be raised).

·  Click on the Open Theme Table button.

·  Move the tables so that you can see the variables for both.

·  To join tables you must have a variable with unique identifying values that will act as a link between the two tables.

·  In this case, State_fips is our unique variable that we will use to join.

·  This is IMPORTANT:

o  You must highlight variables from tables in the order of the flow of data from the first table to the second table.

o  First, highlight the State_fips variable column in the states table (data will be assigned from here).

o  Second, highlight the State_fips variable column in the counties table (data will be assigned to here).

·  Finally, click on the Join Tables button.

·  Now, scan through your newly joined table.

·  Click on Table à Remove All Joins to remove the joined fields you have added.

·  File à Export can be used to create a new dbf file using only the selected records and including the joined fields.

7. Query tool

Make the US Cities theme active and zoom to it.

Click the Query tool.(Hammer with a question mark)

Select cities with population in 1990 > 100,000

Double click on “pop1990” then the “>” button and then type “100000”

Click on New Set

You should see the relevant cities highlighted in yellow.

Open the “cities” table to view all the selected records.

You can now perform another query on the table, such as selecting the records that also have elevations above 1 mile. In this case you would use Select from set.

Working with Grids

(The Spatial Analyst Extension is necessary for grids.)

Add the Pine Grove Mills DEM.

Click FILE à Import Data

Select “USGS DEM” and navigate to the Pine Grove Mills DEM.

Name it “pgdem”.

Click on Analysis à Map Calculator.

Calculations can now be performed on this grid and any other grids you have imported.

Algebraic calculations, as well as other built in spatial manipulations can be performed at this prompt.

Calculate 2 times the DEM as an example. When Evaluate is clicked a new temporary data set is created you can then save the data set or it can be converted to a grid.

Calculate the aspect of the grid.

Type “pgdem.aspect”

Changing Projections

Vector themes are reprojected using the Projector! or ArcView Projection Utility extension.

Grid themes are reprojected using the grid projector extension.

Although a complete discussion of projections is not possible in this class, the ability to change projections is relatively simple.

The need for projections arises from the fact that it is impossible to accurately represent features on the surface of the Earth on a flat map. Various projections minimize certain aspects of the distortions however: some attempt to preserve area, or direction, or shape for instance, while others try to minimize more than one of these characteristics. Time permitting, experiment with changing the projection of one or more of the shapefiles using the projector! extension.

Another method of changing projections is to change the projection within the view, instead of the actual projection of the theme. To change the view’s projection click View à Properties and then Projection.

11