Geography 387 Lab Home | Geography 387 Home | Geography Home

Lab 6: Georeferencing and Digitization


Outline

  1. Introduction
  2. Geodatabase Design
    2.1 Make a new personal geodatabase
    2.2 Define feature datasets and feature classes
    2.3 Download data
    2.4 Import an attribute table
  3. Georeference the scanned map
    3.1 Preparing for georeferencing
    3.2 Georeferencing the parcel raster
  4. Digitization
  5. Calculation of attributes
  6. Digitizing a basic pipe network
  7. Conclusion
  8. To turn in

** Before you begin this lab, review the "Digitization" section of the ArcGIS Tips and Tricks webpage. Don't skip this step...it will ultimately save you time!

1.0 Introduction

This lab assignment will help you learn about the following:

  • Creating a geodatabase with feature datasets and feature classes
  • Georeferencing (georegistration) in ArcGIS
  • Digitizing features in a geodatabase

The scenario is that you have been hired to build a geodatabase for a new section of a rapidly growing city. Your contract is to populate the geodatabase with land use, such as parcel boundaries, parks, industrial areas, etc. You also have to create features representing utilities, such as water and electrical lines. Your first project is to digitize the parcels of a new sub-division and estimate where water pipes will be placed. You are given a scanned paper map that represent the parcel property boundaries. An additional task is to use a formula to estimate the property value of the new lots.

2.0 Geodatabase Design

2.1 Make a new personal geodatabase

Open ArcCatalog. Fist we need a new working folder. In the File menu, select New -> Folder. Give the folder a name (e.g., Lab 6). Now right-click on the folder, then choose New -> Personal Geodatabase. Name the geodatabase "City". If you are unsure of this step, refer to Lab 5 to refresh your memory on how to create a personal geodatabse.

2.2 Define feature datasets and feature classes

You first need to create feature datasets to hold the feature classes you will digitize. Right-click on the empty geodatabase and choose New -> Feature Dataset. In the dialog box that opens, specify the name as "Utilities". Click Next to chose the coordinate system. Navigate to Projected Coordinate Systems -> State Plane -> NAD 1927 and select California Zone 5 (NAD 1927 StatePlane California V FIPS 0405). Click Next, skip the vertical coordinate system by clicking Next again. Accept the default tolerances by clicking Finish.

Right-click on the Utilities feature dataset and select Properties. Refer to XY Coordinate System tab in the Feature Dataset Properties wiindow and the Geospatial Coordinate Systems lecture to answer the following question.

Question 1 :

a. Is State Plane California Zone 5 (also called 405 in slides) in the northern or southern part of the state?

b. Is the zone wider (e.g., E-W direction) than high (e.g., N-S direction)?

c. What projection is Zone 5 based on?

d. What are the units?

e. What is the datum?

The next step is to create a feature class within the feature dataset you just created. Right-click on the Utilities feature dataset and choose New -> Feature Class. Name it pipes and give in an Alias (alternative name) Water pipes. This will be a vector layer with lines representing a pipe network, so chose Line Features for the type of features. Be sure that the Geometry Properties boxes are unchecked. Click Next.

New feature class window

There are several attributes that we need defined for the pipes feature class. In the upper window, click on the empty cell under SHAPE to enter a new field.

1. Enter the new Field Name "Type". Click in the empty field to the right under Data Type and a pull down menu will appear where you can choose the type. Choose Short Integer. In the Field Properties window below click on the empty field beside Alias and enter "Line Type".

2. Enter the new Field Name "maintDate". Click in the empty field to the right under Data Type and a pull down menu will appear where you can choose the type, choose Date. In the Field Properties click on the empty field to the right of Alias and enter "Maintenance Date".

3. Enter the new Field Name "maintType". Click in the empty field to the right under Data Type and a pull down menu will appear where you can choose the type, choose Text. In the Field Properties below you will need to click on the empty field beside Alias and enter "Maintenance Type". Specify the Length field as "20"-- to do this click on the empty field to the right of Length and type the number in.

Feature attributes

Click Finish.

Right-click on pipes (under the Utilities feature class) and open Properties. Click the Subtypes tab. For Subtype Field, use the pulldown to select the "Type" field. Set up the subtypes for the type field in pipes using the tabel below. You do this by clicking in the Code and Description boxes and then type their values. Your subtype definitions should look like the table below.

Code

Description

0

Unknown

1

Main line

2

House line

Pixel subtype definition

This process will allow you to chose between 3 types of pipes when you have digitized a a line (Uknown, Main line and House line). No other values will be permitted for the Type attribute. When you are done, click OK to close the window and finish creating your new pipes feature class.

Now create another feature dataset.

Right-click on the City geodatabase and choose New -> Feature Dataset, name it landUse. Click Next. The spatial reference must also be set. It needs to be the same projected coordinate system as we used for the Utilities feature dataset. This time we can simply import these parameters from Utilities rather than setting them manually again. Click on the Import button, browse through the files for your Utilities feature dataset, and Add it. The Coordinate System updated to match Utilities.

Import the spatial reference from Utiliies

Click Next, then click Next again and Finish to finish creating the landUse feature dataset.

Create a new feature class called parcels in the landUse feature dataset. Right-click on the landUse feature dataset you just created, go to New -> Feature class, name it parcels. This will be a vector layer with polygons representing parcels, so chose Polygon Features for the type of features. Be sure that the Geometry Properties boxes are unchecked. Click Next.

Define the attribute fields as follows:

1. Click on the empty cell under SHAPE in the upper window, and enter a new Field Name "APN". Click in the empty field to the right under Data Type, in the pulldown menu choose Text. In the Field Properties window below enter the Alias for APN "Assessor parcel number". In the field next to Length, change 50 to15.

2. Enter the new Field Name "Cost". Click in the empty field to the right under Data Type, in the pulldown choose Long Integer. In Field Properties below enter the Alias "Land value (in dollars)".

3. Enter the new Field Name "Acres". Click in the empty field to the right under Data Type, in the pulldown choose Float. In Field Properties below enter the Alias "Size of parcel".

Attributes for parcels

Click Finish.

You should have the following feature datasets and feature classes in your Catalog Tree.

Example of feature data sets and classes

 

2.3 Download data

Download the data archive Lab6.zip (right-click, Save As) and save it to your Lab 6 folder. Open the zip archive and uncompress the files into your Lab 6 folder. Refresh ArcCatalog, click on the lab folder in the Catalog Tree and select View -> Refresh in the main menu or F5. You should see a text file and a raster layer appear in the Catalog Tree.

Uncompressed files

2.4 Import an attribute table

Now let's import the table, which in this case is an ASCII text file. Right-click on owners.txt. Choose Export -> To Geodatabase (single). This brings up the Table to Table window. The output geodatabase should be your City geodatabase. Type in "owners" as the Output Table Name. Click OK.

Table import

3.0 Georeference the scanned map

We are going to take a slight departure for a moment to prepare for digitizing features into our new geodatabase. As you now know, GIS users often perform "heads-up" digitizing wherein they use a pre-existing map layer or image as a guide for manually digitizing a new GIS layer. You will now prepare just such a background image that you will then use to guide you in digitizing a land parcel feature class.

3.1 Preparing for georeferencing

You have received a scanned map of the area of a city that needs a utility network. Unfortunately the map is not registered to any coordinate system. In order to digitize using the scanned map as a guide you will need to place it in its appropriate geographic location. We will do this in ArcMap, so go ahead and close ArcCatalog.

Open ArcMap and add the parcel.tif raster layer. Move your mouse around the scanned image and notice that the coordinates given in the lower right corner of the ArcMap window are not what they should be for California. Open the Properties of parcels.tif and go to the Source tab. Use the information in the Source tab to help answer the following question.

Question 2 :

a. What is the x and y cell size? (round to the nearest 4 decimal places)

b. What is the "Spatial Reference" for the raster?

c. What are the "Linear units", if any?

d. What are the left, bottom coordinates (min x, min y)?

e. What are the right, top coordinates (max x, max y)?

f. When you add parcel.tif an ArcMap warning box appears - why? What does it mean?

g. What are the linear units of the numbers displayed in the bottom right when moving the mouse?

h. Why is ArcMap using these units?

In order to use the image with the geodatabase created in Section 2, it must be registered to the same coordinate system as is set for the Utility and Parcels feature datasets in your geodatabase. This will not only place the scanned image within the boundaries of the feature datasets in the geodatabase, but will also assign correct spatial referencing information.

Begin by setting the projection for your ArcMap session. This will ensure that the georeferencing results are displayed properly as you go through the process. Recall from Section 2 that the projection we are using is NAD 27 State Plane for California Zone 5. You should remember how to set the data frame's coordinate system. Try doing it yourself.

If you can't remember, ... Right-click on the data frame ("Layer") and choose Properties, then click on the Coordinate System tab. Import the projected coordinate system information from either the landUse or Utilities feature datasets.

If parcel.tif has disappeared from view, then click on the Full Extent tool on the main toolbar to shift the display over to the image's new location.

ArcGIS comes with a Georeferencing toolbar to georeference feature classes. Load the toolbar by selecting View -> Toolbars -> Georeferencing.

Turning on georeferencing

You will see a toolbar that looks like this:

Georeferencing tool

To georeference data you simply need to create a table of origin points and destination points -- matching specific points on the map with their real-world coordinates. For example, the figure below shows a rectangle A1, B1, C1, D1 being transformed from its orignal coordinates to its destination coordinates at A2, B2, C2, D2. The table next to the figure shows the coordinate transformations taking place.

Georeferencing example

3.2 Georeferencing the parcel raster

Georeferencing the parcel.tif raster scan involves selecting control points on the image that can be referenced to the real-world geographic or projected coordinate system. This can be done in two main ways:

  1. If you have another, coincident GIS layer (e.g. streets) that already has a coordinate system defined, you can match up selected locations (control points) on the scanned raster with the corresponding locations in that GIS layer.
  2. If you do not have another GIS layer, you can use a GPS to find the coordinates of the selected locations in the real world and then input those coordinates for matching points in the scanned raster.

Because you do not have any existing GIS data layers in your geodatabase, you will need to use the second option. In this exercise, the GPS coordinates will be provided to you by a field crew. You will use five control points that have been preselected (see image below).

Parcel scan with numbers

Zoom into the first point (X1 in the image above). To georeference the image, click on the "Add control points" button on the georeferencing toolbar. Your mouse pointer will turn into crosshairs.

Add control points

Place the crosshairs on the intersection of the two lines. When you left-click the mouse button, you will set the X and Y coordinates for your source data. When you move the mouse off of that point, it will have a line connected to the point on the source data.

Georeferencing a point

If you had a reference GIS layer (such as the streets data mentioned above) you would simply zoom to the reference layer and click on the corresponding location. The coordinate information for both of these points would then be added to the "link table", which lists all of the control points and their correct referenced location.

Since you do not have a reference GIS layer, you must manually input GPS data that has been gathered for you. After clicking on the first control point, right-click and select "input X and Y."

Input xy

This will open a window for you to enter the GPS x,y coordinates for that control point. For each of the control points, you will enter California State Plane coordinate data:

Control point GPS X coordinate GPS Y coordinate
X1 1786095 624300
X2 1787416 624300
X3 1786481 623882
X4 1786738 624170
X5 1787371 623781

As you enter the data, the raster will automatically move to fit the new coordinates. If the raster moves offscreen, click on the Full Extent tool on the main toolbar to shift the display to the raster's new location.

Raster georeferenced

When you have entered all five control points, click on the View Link Table button.

View link table

This window shows you the control point number (e.g., X1, X2, etc.), the source coordinates, the GPS (State Plane) map coordinates, and the residual error of the georeferencing equation. Notice that the equation is using a 1st Order Polynomial, or Affine transformation. This is the least complicated transformation that can perform translation, scaling and rotation of our raster image. The parameters for the transformation equation are estimated from your digitized points and the associated GPS coordinates. If there are errors in your point selection on the screen (source coordinates) or in the GPS measurements (e.g., from range errors), then the transformation will be less accurate. The residual gives you an idea of how much error each point contributes to the transformation equation.

Link table

You may need to refer to the book chapter 4, Scanning and Digitization lecture and ArcGIS help (hint: look under "georeferencing" in the help index) to answer the following questions:

Question 3:

a. What is the use of RMS error?

b. What is your total RMS error of the transformation using your five control points?

c. How is residual error related to RMS error?

d. If a single point contributed a lot of residual error to your equation, what steps would you take to minimize its influence?

Save your table to an ASCII text file with the Save... button. Keep this text file in a safe location. You will be turning it in with the lab deliverables. You are now finished with this section. On the Georeferencing toolbar, click on Georeferencing -> Update Georeferencing to save the parcels.tif raster's new, georeferenced coordinate system. Open the raster's properties to answer the following questions:

Question 4 :

a. What are the raster's x and y cell sizes?

b. What is the Spatial Reference?

c. What are the linear units?

d. Which of these values for a-c are the same as the ones recorded Question 2? Which are different? Why are they the same or different?

4.0 Digitization

Now that you have a base image that has been georeferenced, you can digitize your parcel polygons from it and they will be in the correct coordinate system.

Add the parcels feature class from your geodatabase. Turn it on in the TOC. You won't see any fetures from parcels display... why?

For digitization, you will need the Editor Toolbar. You can get this toolbar by clicking the button Editor toolbar.

On the Editor Toolbar select Editor -> Start editing. The target layer should be your parcels layer (since that is the only editable layer that has been added at this point). If, for some reason, parcels is not the listed target layer, click on the down arrow to the right of the target box and select parcels.

Select Create New Feature in the task window. Now click the Sketch Tool (it looks like a pencil).

Create feature

Zoom in to the first parcel (parcel #20) in the upper left corner of the scanned raster. With the Sketch Tool selected, click in succession on the upper left corner, the upper right corner, and the lower right corner of the parcel. Notice that a triangular polygon has been created based on these 3 points.

Digitizing a parcel

Finally double-click on the oblique corner of the parcel (below the diagonal of the triangle) to finish the polygon. Doing this will automatically snap the nodes. You should see a completed polygon with a fill color (probably a default color if you haven't changed the parcel symbology). If you don't see your polygon... did you turn it on?

Digitized parcel

While you are digitizing, it is a good idea to periodically save your edits (Editor -> Save edits).

The feature should have a cyan (light-blue) border. This is because it is selected. you can deselect the feature by selecting the Edit Tool Edit Tool and clicking anywhere on the display. You can also use this tool to select any polygon that has already been digitized. Once selected, the polygon can be deleted by pressing the Delete button on your keyboard.

Hint: It may be easier to digitize the polygons if you set the polygon symbol so that it has a hollow fill and a brightly colored outline (example below).

Digitized polygon

You could digitize the adjacent polygons the same way, but no matter how careful you were, the edges would not exactly match, and your would create "slivers". To create polygons without slivers, change the Task from Create New Feature to Auto Complete Polygon. The Auto Complete Polygon task will allow you to join new polygons to existing polygons so that they share borders without you having to digitize them multiple times. To make the joining polygons even easier, open the Editor-> Snapping window and check the Vertex, Edge, and End boxes. This will automatically "snap" the digitizing cursor to existing features.

snapping environment

With the Sketch Tool selected, you will digitize the remaining polygons (the ones that are closed and that have small numbers within circles). Since you are using Auto Complete Polygon you must start and end on the vertex, edge, or end of an existing polygon (this is where snapping is particularly helpful). As you digitize each polygon, you can enter its attribute information by clicking on the Attributes button Attribute button on the Editor Toolbar while the newly-digitized polygon is selected. The APN (Assessor Parcel Number) for each polygon will take the form: 52-015-parcel#, where parcel# is the number in the circle inside each polygon. For example, the APN is 52-015-22 for the digitized polygon below. We will leave the Cost and Acres attributes Null for now. If you prefer, you can enter the APN information for all of the polygons after you have finished digitizing. In this case, you would selected each polygon with the Edit Tool edit tool, then use the Attribute button..

Digitized parcel 22

On parts of the map where there are curves in the polygon that you are digitizing, you can use the Arc Tool (click the pop-up button next to the Sketch Tool to see this option) to make the appropriate curves in the feature. Ask your instructor for help to see this tool in action.

Arc Tool

Of course you could be less precise and just digitize the curve as a series of short linear sections, but the fact that ArcGIS lets you digitize with spline curves is very nice. While you are digitizing a linear section, use the pencil tool, and then when you get to the curve, select the Arc Tool and then digitize the curved part of the feature.

Below is a screenshot of what your digitized parcels should look like. If you did not already assign APNs to the polygons, do so now. Be sure to save your edits.

All digitized parcels

 

5.0 Calculation of attributes

There are still two fields that do not have attributes -- Cost and Acres. We will have ArcGIS calculate these fields for us.

The georeferenced data are in feet, so the Shape_Area calculation that is automatically computed for the polygons will be in square feet. There are 43560 square feet in an acre. You can use this information to calculate the acreage for each of the polygons. Make sure that no records are selected in the parcel feature class (on the main ArcMap menu click on Selection -> Clear Selected Features). Use your skills from previous labs to calculate the Acres (alias "Size of parcel") based on the Shape_Area attribute. This entails using the Field Calculator. Alternatively, you could use the Calculate Geometry tool.

To calculate property value we will use a slightly more complicated formula. Property value is based on size of parcel, but the larger the parcel the more it is worth per acre and in total -- after all, you can develop it into several condos!

The value estimates that you have received are as follows:

Properties of less than 1 acre are worth $300,000 per acre
Properties of more than 1 acre are worth $400,000 per acre

To enter this data into the attribute table, you could hand calculate each of the values using a different equation for each parcel, or you could take advantage of the fact that you can use Visual Basic scripts in ArcGIS's Field Calculator tool. We will use the second option.

Right-click on the Cost field (alias is "Land value") and select Field Calculator. Clear any previous calculation, then check the Advanced box. The Field Calculator window will now show the Pre-Logic VBA Script Code text box. VBA stands for "Visual Basic for Applications", a Microsoft programming language.

Copy and paste the following into the VBA script code box::

if ( [Acres] <1) then
pvalue = [Acres]*300000
elseif ( [Acres]>1) then
pvalue = [Acres]*400000
endif

In the lower text box, enter the name "pvalue". In the script that you copied and pasted, "pvalue" is the variable name storing the parcel value.

Cost calculation

Click OK to calculate the values. Save your edits to the table: Editor Toolbar -> Stop Editing.

Question 5 :

a. If you want to know the property owner of each parcel, what steps would you take in ArcGIS to find out? (hint: relate...)

b. Who is the parcel owner for 52-015-20?

 

6.0 Digitizing a basic pipe network

You have now finished digitizing the parcels polygons. Now you have to do digitize the pipes that will connect to each parcel and form a water network.

Remove (and save if prompted) the parcels feature class from ArcMap. Add the pipes feature class from the Utilities feature dataset. Turn on pipes in the TOC. Set up the snapping environment for pipes as you did for the parcels.

Using your skills from Section 4.0, begin editing the pipe network. There is no official pattern for the pipe network--you are in charge of the design! The only rules guiding your design are:

  • Main pipes can only run down the middle of streets. (You can consider the blank area at the top of the scanned map to be a street.)
  • Each parcel must have at least one house water line
  • There should be no "unknown" pipe types when you are done digitizing

Setting feature types (very important!): As you digitize each pipe in the network, you will need to set the appropriate line type in the Target drop-down menu of the Editor toolbar.

Selecting target pipe type

To change the line type of a given feature after it has been digitized, select it with the Edit Tool then right-click and choose Attributes. The line type (and other attributes) will be listed in the right-hand column, and you can change line type by clicking in the Value column and choosing from a drop-down menu.

Choose appropriate symbology: Change the symbology for the features so that they are more realistic. When you select a symbol for editing, in the Symbol Selector there is an option for More Symbols. From this you can select from a wide variety of themed symbol sets -- including Utilities and Water/Wastewater. Also, you can turn off the "All other values" class by unchecking its box in the Symbology tab.

All other values

An example of a digitized network is shown in the screenshot below. Your network does not need to look like this example.

water pipes

Map 1
Make a map of your parcels and pipe network. Turn off the raster image!

On the map, include the following:
1) Labels for the parcels using the APN codes. This can be done by going to the parcels layer Properties, then clicking on the Labels tab. Check on the option "Label features in this layer". Be sure that the label field is set to Assessor Parcel Number.

2) Use appropriate symbology to distinguish the pipe types and pipes from parcels.

3) The projection type, location, zone, coordinate units, etc. in a text box.

4) Also in a text box: A description about how the feature classes were created.

5) Title, your name, legend, scale bar, north arrow, neat line, etc.

Export the map to a PDF file with 150 dpi.

 

Map 2
Make a choropleth map of your parcel costs. Turn off the raster image!

On the map, include the following:
1) Labels for the parcels with their individual value in dollars.

2) Symbolize the parcels with the cost attribute that you calculated. Chose any appropriate graduated color scheme (e.g. natural breaks).

3) The projection type, location, zone, coordinate units, etc. in a text box.

4) Also in a text box: a description about how the feature classes were created and how the cost was calculated

5) Title, your name, legend, scale bar, north arrow, neat line, etc.

Export the map to a PDF file with 150 dpi.

 

Extra Credit Map
Make a map of parcel owners. Turn off the raster image!

On the map, include the following:
1) Labels for the parcels with their property owner names (hint: this will require a table join).

2) The projection type, location, zone, coordinate units, etc. in a text box.

3) Title, your name, legend, scale bar, north arrow, neat line, etc.

Export the map to a PDF file with 150 dpi.

 

7.0 Conclusions

In this lab you have learned the procedure for setting up a new geodatabase with feature datasets and feature classes. You have also stepped through populating a geodatabase by digitizing features from a georeferenced, scanned map.

8.0 To turn in

  • The question sheet, with typed answers (Word document)
  • Control points files (ASCII text)
  • Map 1: Parcels and pipe network
  • Map 2: Parcel values
  • Map 3: Extra credit (optional)

Submit electronic files via email to klacefie@sonoma-county.org, with the subject "G387, Lab 6, [your last name]".


This lab was originally created by Sean Benison, Jordan Hastings, Nicholas Matzke, Sarah Battersby and Jeff Hemphill. UC Santa Barbara, Department of Geography © 2000-2005 Regents of the University of California. Used with permission.

Condensed and ArcGIS 9.2 version for instruction at Sonoma State by Matthew Clark, Geography and Global Studies Department, Sonoma State University.

This page was last modified on Sep. 3, 2008 by Matthew Clark