Exercise 8 by liwenting


									Lab Exercise 3 Working with Images, Digitizing
In last weeks exercise you got practice downloading some background images. These
included the Digital Orthophoto Quads (DOQQs) at 1:12,000, State Address Mapping
Board true color imagery (SAMB) at 1:4,800, or Digital Raster Graphics (DRGs) at
1:24,000 found at the WVU Tech Center website. Both DOQQ and DRG images are
available by USGS 7.5 minute quadrangle name, so it helps to know the name of the quad
map that you will need. There is an index map with quad names in the TOPONAME
field found in the c:/temp/gis-data/shapefiles/topoquadboundaries.shp.

In this lab exercise you will learn how to use images as a background data source for
creating new data. The practice part of this lab will show you how to create and edit
outlines of various landmarks in the Morgantown area. Generally when digitizing
features, you use a background image, then digitize vector-based (point, line, polygon)
layers based on features that you can identify on the background image.

Before starting with step 1 below, go to the class website and download the for-lab3.zip
file. Be sure to uncompress it to the c:/temp folder. Ask if you are not sure or need help.

Step 1: Start ArcMap

    Start ArcMap if you don’t already have it open.

    Go to the File menu and select Open. This is different from the add button.

    Navigate to the c:/temp/for-lab3 folder, locate digitizing.mxd and open this map

When the map document opens, you will see a simple map with two layers: roads and an
aerial photo. The photo is of the Morgantown North quadrangle’s DOQ image, which
was taken in April 1997.

Step 2. Open ArcCatalog and Create a New Shapefile

You will now create a new shapefile to contain data that you will digitize. Your new
shapefile will store polygon outlines of landmark features around Morgantown and the
WVU Campus.

New shapefiles are created using ArcCatalog. You can open ArcCatalog from within
ArcMap, create your new shapefiles, then add the new shapefiles to the map.

 Ex 3: FOR 326                                                                            1
    In ArcMap, click on the button to launch ArcCatalog.

    When ArcCatalog opens, navigate to your personal folder that you created earlier
     in the class. If you don’t have one on the c:/temp drive of the machine you are
     currently working, simply make it now before

    Highlight the name of your folder in

    Go to the File menu and select New > Shapefile.

    When the Create New Shapefile dialog appears, change the Feature Type to
     Polygon and the Name to Morgantown_Landmarks.

A new, blank shapefile named Morgantown_Landmarks will be added to your folder.

Now that you have created the new shapefile, you can also use ArcCatalog to add fields
to their attribute tables. You will add fields to hold the name and area of each polygon.

    To add a field to the Morgantown_landmarks.shp shapefile’s table, double-click
     on the shapefile’s name on the left-hand side of the ArcCatalog window to open
     the shapefile’s properties window.

    In the Shapefile Properties window, highlight the Fields tab.

    Place your cursor in the cell below the “Id” field name and type in Name as the
     name of a new field.

    Under Data Type, select Text as the data type for your new field.

    Add another field “Area_acres” for area in acres.

 Ex 3: FOR 326                                                                              2
    Set the data type field as Float. (this allows us to calculate values with decimals)

    Set the Precision to 10.

    Set the scale to 2.

    Press OK to close the Shapefile Properties.

Step 3. Insert Layer for New Shapefile into View

    Go back to ArcMap and add the Morgantown_landmarks.shp shapefile to your
     Table of Contents in ArcMap with the plus or add data button. (You may see an
     ArcGIS warning message – just disregard this for now).

The new layer will be added to your view display. However, since there are no features
(no polygons) in this shapefile yet, nothing really happens to your map. Make sure it is
above the image in the table of contents by dragging it to the top.

Step 4. Open the Editor Toolbar and Start an Edit Session

 Ex 3: FOR 326                                                                              3
You are now ready to start adding features to the landmarks layer. All feature editing in
ArcMap is performed in an edit session. Before you can start an edit session, you must
display the Editor toolbar.

    Click the Editing button    on the Standard toolbar to add the Editor toolbar. If
     you like, dock the toolbar.

Notice that all of the buttons on the Editor toolbar are disabled because you haven’t yet
started an edit session.

    From the Editor menu on the Editor toolbar, select Start Editing.

Since you are only able to edit one geodatabase or one folder of shapefiles at a time (and
you have shapefiles from different folders loaded in your display) ArcGIS gives you a
choice of datasets to edit as shown:

    In the Start Editing window, choose your personal folder c:\temp\mike (contains
     my new shapefile) and press OK to continue.

    Press Start Editing and/or OK in any subsequent dialogs as well.

Step 5. Create a New Feature

You will now begin digitizing landmarks around Morgantown. Your first feature to
digitize is the Monongahela River. The Monongahela is the large river visible on the left
(western) half of the image.

 Ex 3: FOR 326                                                                               4
   On the Editor toolbar, make sure that Morgantown_landmarks is your target layer.

   Make sure that the current task is set to Create New Feature.

   Click on the Sketch Tool (Pencil) to make it active.


          Sketch Tool            Task                      Target Layer
        (Name changes                                        (May be
         based on task)                                     changed)

   Position your mouse near the river’s western edge at the top of the image.

   Click with your mouse once at this point, shown at the “Start here” location

   Next, move your mouse down along the western edge of the river, clicking once
    at every “bend” in the river to trace the western shoreline of the river.

                                          Start here

   Continue clicking at every bend, until you have gone around the entire outline of
    the river as visible on this image (go to the bottom of the image, then move to the
    eastern shoreline of the river and return back up to the top).

   When you are finished, double-click to complete your river polygon.

Ex 3: FOR 326                                                                           5
You just added a new polygon to your shapefile for the Monongahela River. The next
few steps will show how to improve on your work thus far.

Step 6. Set Layer Transparency (make edits easier to see)

The river outline that you just digitized needs some further editing. Before you make
your edits, notice that the new landmark feature you just digitized makes it difficult to see
the aerial photo underneath.

You can set your landmark layer to be partially transparent, so you can see through it to
the aerial photograph below.

    Right click on your landmark layer’s name and select Properties from the layer’s
     context menu.

    In the Layer Properties, click on the Display tab.

    In the Display tab, set the Transparent % to 50%.

    Close the layer properties.

Now you should be able to see through the landmarks to the image beneath. This will
make for easier editing in the future.

 Ex 3: FOR 326                                                                              6
Step 7. Edit Existing Vertices

First, you will zoom into a location where you may wish to fix your work. Locations of
interest for this exercise have been saved as spatial “bookmarks”, much like bookmarks
or favorites in your Internet browser.

    Go to the View menu and choose Bookmarks > Step 7. Monongahela River –

Your view will zoom to the extent of this previously saved spatial bookmark. This area
was bookmarked because it is highly likely that your digitized river boundary will need
some editing in this area, especially in the area around the barges that are visible in the
aerial photo.

Now you will use the Edit tool. The Edit tool is the primary tool for selecting and
moving features and manipulating vertices.

    Click the Edit tool on the Editor toolbar.

    Double-click on the river polygon you just added.

The polygon is highlighted and the individual vertices are shown with green squares.

    Find an existing vertex that looks like it needs to be moved.

    Hover your mouse directly over that vertex. Do you see how the mouse’s cursor

 Ex 3: FOR 326                                                                                7
    Click once with your mouse on the vertex. Hold down the mouse button, and
     drag the vertex to a more correct location. Release the mouse button when you
     have moved the vertex.

    Repeat this process, moving all vertices in the current extent until they better
     represent the river’s shorelines. Remember, this is just for practice. You don’t
     have to make it perfect the first time. Ask if you have a question.

Sometimes, you need to add new vertices to make your digitized shapes more accurate.

    To add a new vertex (bend) to a shape, make sure you have selected the Edit tool

    Double-click again on the shape you wish to edit to select that feature (selected
     features will turn bright blue, and the vertices should be shown with green

    Move your cursor so that it points to a location along the existing feature where
     you would like to add a new vertex. (If you’re not right over the existing feature,
     you won’t see the Insert Vertex menu choice).

    Right-click with your mouse and choose Insert Vertex from the edit context

    A new vertex appears. Move the new vertex to the desired location.

 Ex 3: FOR 326                                                                           8
    Continue adding and moving vertices until the shoreline of the river looks correct.
     You only need to worry about it in this small area (don’t worry about the entire
     length of the river – this is just practice!)

Step 8. Cut or Split a Polygon Feature

There are two bridges that cross the Monongahela River in this aerial photo. The river
polygon that you just added can be split at the location of the bridges (note - this is not
something you would actually do want to do with this dataset – this step is just for

A spatial bookmark has been set for this step for the old Star City bridge. (A new bridge
has been built since the date of the aerial photo – a good example of the need to know the
date of your datasets.)

    Go to the View menu and choose Bookmarks > Step 8. Split River at Bridge.

    You have to have a polygon selected for the split operation. Make sure the river
     polygon is selected by clicking the Edit tool, then clicking your river polygon.

    Click on the Sketch (pencil) tool.

    Change the Task to Cut Polygon Features.

    Digitize a straight line to cut the river polygon in two at the bridge (as shown).
     Double-click to end your line.

The polygon is split.

    Use the Pan button to pan down to the south (upriver) until you find the 2nd bridge
     (the Westover bridge).

    Repeat your Cut Polygon Feature operation here.

You should now have three polygons to represent the Monongahela River.

 Ex 3: FOR 326                                                                                9
Another helpful tool is to be able to add a polygon that will be adjacent to an existing
polygon. For example, in the graphic below I digitized two separate polygons that
overlap or underlap on the edge they share. This is poor quality.

Since both polygons share a common boundary, the proper way to do this is not to draw
the shared border twice. We need to use the autocomplete option when digitizing.

After drawing one polygon with the Task set to Create New Feature….


             Sketch Tool              Task                       Target Layer
           (Name changes                                           (May be
            based on task)                                        changed)

Now change the Task: to Auto Compete Polygon as shown below

 Ex 3: FOR 326                                                                                10
This will allow you to click once inside the existing polygon, continue outside the
polygon, draw the rest of the feature, and then finish by clicking twice back inside of the
polygon you started in.

                               Start inside

                               End inside

This will create a clean single boundary between the two polygons

Don’t’ forget to switch the task back to Create New Feature if you want to draw another
separate polygon.

Step 9. Edit Attributes of Features

Before we digitize additional landmarks, we will attribute the three polygons you have
already added with their proper name.

To edit attributes of features, the features must first be selected.

     Zoom to the extent of all river polygons by right-clicking your Morgantown
      Landmarks layer, then selecting Zoom to Layer.

     Once you can see all of the polygons, click on the Edit tool on
      the Editor toolbar.

     Hold down your <SHIFT> key and click on all three polygons to select them all.

     Click on the Attributes button at the far right of the Edit toolbar (circled).

 Ex 3: FOR 326                                                                           11
The Attributes dialog window appears. This window shows (in a tree format) the
attribute values for all selected features. You should have three features selected (your
numbers may differ from those shown). The left hand side shows the selected features,
the right hand side shows their attributes. You can type new attribute values in on the
right hand side.

    Click on the Morgantown_Landmarks heading on the left hand side of the dialog.
     This means you will edit attributes for all three features at once.

    Next place your cursor in the Name value cell on the right hand side of the dialog
     (outlined by a rectangle above).

    Type in Monongahela River as shown for the name of these three features.
     Press Enter.

Your features are now attributed with the name Monongahela River. Try clicking on
each feature (in the left hand side) to see the features blink on the map.

    Click the X in the upper right hand corner of the dialog to close it.

 Ex 3: FOR 326                                                                              12
Step 11. Save your Edits

It is always a good idea to save your edits as you go along.

    Go to the Editor menu on the Edit toolbar and select Save Edits.

Your edits are saved, but your edit session is still open for more work.

Step 12. Calculate Values for Area for All Features

Now that you have several features digitized in the area, you wish to have the software
calculate area values for these features. ArcGIS does not automatically update area (or
length, perimeter etc.) fields in a shapefile dataset – you have to “do it yourself”.

ArcGIS stores the area in the map units of your dataset (in this case square meters, since
the image we are digitizing from is in the UTM projection). You may also wish to
convert the area in square meters to something more useful to you, like acres.

    Go to the Morgantown_Landmarks layer’s context menu (right-click the layer’s

    Choose Selection > Clear Selected Features from the context menu.

This will clear out any selection you may have (so that your area calculation applies to all

    Open the attribute table for the Morgantown Landmarks layer.

    With the table open, highlight the Area_acres field and right-click.

    Select Calculate Geometry.. from the menu.

    When the Calculate Geometry dialog opens, make sure the property you want to
     calculate is Area and the units are set to Acres since that is what we want

 Ex 3: FOR 326                                                                            13
    When you press OK, it will calculate acreage for each of the digitized polygons.

Step 13 Stop editing

    From the Editor menu, click Stop Editing. Click Yes when asked to save your

When you have digitized all of the Morgantown Landmarks, create a map showing their
locations and turn this in stapled to the rest of the questions on the following page.

 Ex 3: FOR 326                                                                       14

FOR 326
Spring 09

Exercise #3
Assigned Fri Jan 30
Due Wed Feb 4

30 points

Question 1. (10 points)
When you have digitized all of the Morgantown Landmarks, create a map showing their
locations and turn this in stapled to the rest of the questions on this page. Try to label the
area in acres of the digitized features. Refer to exercise 1 if you forget how to make a
map using the template option.

Question 2. (4 points)
What color is the WVU football field when viewing it with the color infrared image?

Question 3. (6 points)
Go to the WVU Tech Center Website and find the scale and date of the DRGs you used
in exercise 2, scale and date of the color infrared DOQQs, and scale and date of the

Question 4. (10 points)
I want you to digitize an area at the WVU Research Forest that has recently undergone
some treatment activity. You will be able to easily identify it as the cleared area on the
image located on the c:/temp/for-lab3 folder called subset_wvu_rgb_color.img. Go the
class website and download the file (for-lab3.zip) if you haven’t already done so.
Digitize the boundary of this area and calculate the acreage in acres. The steps are very
similar to what you practiced doing in this exercise. After you digitize this polygon and
calculate the area, create a map of the digitized polygon with information on the area that
you calculated. If you forget how to create a map layout using a template, refer to the the
first lab exercise. When finished print your map and turn it in with the rest of your
answers for this exercise.

 Ex 3: FOR 326                                                                              15

To top