Geography 176B Lab Home | Geography 176B Lecture Home | Geography Home | 176B Help & FAQs

LAB 3: Geodatabase design & population
Time for completion: Two Weeks (warning: do not put this off until the week it is due!)

Outline


* Please use the double sided option when printing [File -> Print, Click on Properties, Select Print on Both Sides] 

1.0 Purpose

This lab assignment will help you learn about the following:

  • The geodatabase and its capabilities
  • Creating a geodatabase
  • Georegistration in ArcGIS
  • Digitizing features in a geodatabase
  • Validation using geodatabase rules

2.0 Introduction and background

In the previous lab, we discussed the 3 basic data structures used by ArcGIS: the shapefile, the coverage, and the geodatabase. It is important to be familiar with all three of these data structures, but the geodatabase in particular is becoming especially prominent in ESRI GIS. More and more functions are being directed toward the geodatabase as the software evolves, and ESRI is committed to continuing this. If you intend to use GIS professionally in the future, you will need a good understanding of geodatabases. This lab assignment will give you direct experience with geodatabases and step you through the entire process of creating a simple one.

NOTE: This is a long and complicated lab assignment, so please be sure to put aside ample time to complete it.

2.1 Geodatabase structure

Basic components

Recall from the previous assignment that the geodatabase uses a vector data model to represent geographic features, and is based on the relational database architecture. It should thus not be too surprising that, like shapefiles and coverages, at its most basic level the geodatabase consists of basic geometries (points, lines, polygons) and attribute tables. These take the form of feature classes, feature datasets, and non-spatial tables.

Figure 1. The basic components of a geodatabase. (Source: ESRI)

The feature class is the most basic component of a geodatabase. A feature class contains geographic features of the same geometric type (point, line, or polygon) and spatial reference frame. It is analogous to a shapefile or geometry layer of a coverage. Feature classes are the components you will be dealing with most commonly and directly when using geodatabases.

Feature classes can either stand alone, or be grouped into a feature dataset. A feature dataset is a container for feature classes that are thematically related and share the same coordinate system and geographic extent. Feature datasets allow you to organize feature classes in ways that are the most appropriate for your given application. For example, if you are a hydrologist collecting data on stream channels in several different watersheds, you might create a dataset for each watershed to hold all of the feature classes related to it. Also, feature datasets enable you to establish both spatial and non-spatial relationships between feature classes, as you will see later in this lab.

Non-spatial tables are the third basic component of a geodatabase. These tables do not have any spatial information in them, but can be connected with existing feature classes, effectively extending them with additional attributes that can be queried and symbolized as if they were a natural part of the feature class. This powerful capability makes it easy to use data tables created outside ArcGIS that are related to geographic features after the fact.

Rasters

In addition to vector data, geodatabases also can contain rasters. Here is what you can expect for the Microsoft Access based personal geodatabases:  For practical purposes, you can envision rasters as being "inside" the personal geodatabase, but in fact they are merely "managed" by it -- kept "outside" the personal geodatabase but recorded and tracked by it so that you can use them seamlessly inside ArcGIS. The new file based geodatabase actually does store raster data inside as opposed to just managing it. 

A raster dataset consists of one or more adjacent images in the same format, whereas a raster catalog is a collection of images in potentially different formats and resolutions and that need not be adjacent.


Figure 2. The full framework of a geodatabase. (Source: ESRI)

Relationships

A powerful advantage of the geodatabase is the ability to build structured relationships between features. These relationships can have behavior and enforce rules. Modeling relationships with behavior and rules allows you to make the objects in your GIS much more faithful to the real-world features they represent.

Consider the example of a utility power pole with transformers. Perhaps you want to describe the location of the transformer on the pole -- e.g., height above the ground and facing direction (North, West, etc.). Certain structural requirements and limitations determine where these transformers can be attached to the pole, and the geodatabase could be designed to reflect this. Specifically, as the geodatabase designer you can constrain the "height" field of the transformer to between 10 and 20 feet, and the "location" field to allow only the options of North, South, East, or West.

In the real world, only a small number of transformers can be attached to a pole -- we might imagine that four transformers is the maximum. In geodatabase terminology, transformers have the "attached" relationship to poles, with a many-to-1 cardinality (maximum of 4 in this case). As geodatabase designer you can implement this constraint. After four transformers have been assigned to that pole, a transformer would have to be deleted before another could be added.

The relationship between poles and transformers is directional as well. In a directional relationship, changing A will change B, but changing B will not change A. If you move a pole (in real life and in the GIS), you expect the transformers on the pole to move as well, but you cannot move a transformer in the database by itself, as it must always be on a pole. If you delete a pole from the geodatabase, you want the transformers on that pole to be deleted as well. However, if you delete a transformer, the pole should remain. All of this can again be specified in your geodatabase design.

Relationships and behavior are modeled via several different approaches in the geodatabase. Relationship classes specify connections between different feature classes of the geodatabase (e.g. between plots of land and their owners), and involve either 2 feature classes or a feature class and a non-spatial table. Analogously, topologies allow you to define constraints on spatial relationships in the geodatabase. Network Datasets built using the Network Analyst extension allow you to model complex transportation networks where flow can travel in more than one direction or be restricted on one way streets.  Finally, geometric networks allow you to define and analyze interconnections (and hence the flow of resources) in network feature classes involving pipelines, electrical power lines, etc.


 
Question 1:
Give an example of two simple (geographic) features that you might want to represent in a geodatabase as having a relationship. Specify the relationship's cardinality and directionality, and suggest some rules for data entry and editing involving the relationship. (This is just a conceptual exercise, so you do not have to actually create these items in the computer.)



Exercise I

3.0 Geodatabase Design

Now we are going to walk you through creating a geodatabase. There are several advantages to this new type of data model that you will hopefully recognize with this simple exercise. We will only be working with a few polygons, line segments and nodes but the process you will learn can easily translate, with slight modification, to a database that could containing tens of thousands of interrelated geographic features.

In a sense we are working backwards. Since this is a learning exercise it is important to understand the mechanics of the software first. We will be constructing a UML diagram that represents the geodatabase we are going to make AFTER we make it. This is backwards because in practice we should first plan-out what types of features we need our database to contain, who is going to be using the database, what kinds of relationships the features in our database should have etc.

It will help immensely to have done the related reading for this assignment -- if you have not, you will have difficulty understanding what you are doing. You will probably be able to get through this part of the lab but it will not be worth your while until you DO THE READING!!!

Step 1 - Make a geodatabase

Create a "Lab_3" folder on your removable disk. (If you do not have a removable disk, use the C:\Workspace folder on your hard drive instead, but be warned that you risk having to re-do large portions of this assignment!) Open ArcCatalog and connect to this new "Lab_3" folder. Right click on the folder and choose New -> Personal Geodatabase. Name it "City".   You may need to right click the personal geodatabase and choose Rename from the context menu.


Step 2 - Define feature datasets and feature classes 

You first need to create feature datasets to hold the feature classes you will create. Right-click on the empty geodatabase and choose New -> Feature Dataset. In the dialog box that opens, specify the name as "Utilities" without quotes and click Next to proceed to the next window designated for coordinate system information. You must also set the spatial reference for the dataset.  Expand the Projected Coordinate Systems folder by clicking on the small plus sign next to it.   Navigate through the folders to find State Plane -> Nad 1927.  Highlight NAD 1927 StatePlane California V FIPS 0405, and click Next.




The next window allows you to choose the coordinate system that will be used for Z coordinates in this data.  Your data will not have z coordinates, so you may accept the default of None and click Next.

The final window allows you to set XY Tolerances.  You will accept the defaults and click Finish.

The next step is to create a feature class within the dataset you just created. Right-click on the Utilities feature dataset and choose New -> Feature Class. Name it "pipes" and give in an Alias "Water pipes".  For type, choose Line Features.  Again, you will not be storing M values or Z values, so you can leave those check boxes unchecked.  Click Next.


In this next window, you will set some of the attributes for these features.

 

Click on SHAPE Field Name, its properties will then appear in the window (called Field Properties).

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".  The default length of a text field is 50, but this is too long for our purposes.  Change the length to 20. 

    4. Enter the new Field Name "weight". Click in the empty field to the right under Data Type in the pull down menu choose Long Integer. In the Field Properties enter the Alias "pipe weights (Resistance)".

5. Click Finish

 

Now create another feature dataset.

Right-click on the city geodatabase and choose New -> Feature Dataset, name it "landUse" and click Next. The spatial reference must also be set. Because it needs to be the same as the one we declared for the Utilities dataset, this time we can simply import the projection information from Utilities rather than setting it manually again. Click on the Import button, browse through the files for your Utilities feature dataset, highlight it by clicking on it once and then click Add.  Click Next twice to accept the spatial reference, and to accept the default vertical coordinate system information.  You will also accept the default XY tolerance settings and click Finish.

Right-click on the landUse feature dataset you just created, go to New -> Feature class, name it "parcels", and choose Polygon Features for the type.  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 pull down menu choose Text. In the Field Properties window below enter the Alias for APN "Assessors parcel number". In the field next to Length, change the value to 15.

2. Enter the new Field Name "Cost". Click in the empty field to the right under Data Type, in the pull down 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 pull down choose Float. In Field Properties below enter the Alias "Size of parcel".

4. Click Finish.


Step 3 - Import a table

Now let's import a table, which in this case is an ASCII text file. Download the file (right-click, Save As) and save it to your "Lab_3" folder. (If you cannot see the file in ArcCatalog afterwards, click on View -> Refresh in the main menu.)

In ArcCatalog, right-click the City geodatabase, and choose Import -> table (single) from the context menu.  When the Table to Table window opens, click the owners.txt file in the tree view of ArcCatalog and drag it into the Input Rows space.  If you use the browse button to navigate to it on your computer, you many not see it, but you can drag and drop it onto the dialog box.  For Output Location, make sure the path is pointing to your City geodatabase.  For Output Table, type "owners".  Accept the rest of the defaults and click OK.

The final step is to ensure that the newly imported table is registered so that the geodatabase can start to use it. Find the new "owners" table which will appear within your City geodatabase. Right-click on it and check whether Register with Geodatabase is faded out or is in dark text on the menu. If it is faded out, the table has already been automatically registered and there is nothing you need to do. If not, select Register with Geodatabase to complete the registration.

Step 4 - Make the network

Now we have defined feature classes, "landUse", which contains parcels (polygons) and "Utilities", which contains pipes (lines), we need to set up the utility network to relate them.

    1. Right-click on the "Utilities" feature dataset, go to New -> Geometric Network.

    2. Click Next, Click Next again (you want to Build the geometric network from existing features).

    3. Make sure that "pipes" is selected, accept the default name (Utilities_Net) for the network, click Next.

    3. Do you want to preserve existing enabled values?  Yes. 

    4. Do you want complex edges?  Select Yes, make sure "pipes" is check on and click Next. 

    5. Do features need to be snapped? Select No and click Next.   Do you want to assign weights to your network? Select Yes.  Under the Weight Name column type "weight", click in the Type field next to it and select Integer. Add a new weight by clicking on the small white page button above the gray X button on the right side of the window, enter the name "length" and click in the Type field next to it and select Double (see below). Click Next.

    6. Assign your weight fields in your feature classes. In the Available network weights window, "weight : : Integer" is selected, in the area below you see "pipes", to the right of that is the Associated field column. Click in it and select "weight" from the pull down. (see below)

    7. In the same window, under Available network weights choose "length :: Double" from the pull down. In the window below, in the field to the right of "pipes", select "SHAPE_length" from the pull down.

    7. Click Next. The next window displays a summary of the information you have just entered. Click Finish and ArcGIS will build the network. 


Step 5 - Assign attributes to the network

Set the attribute subtypes.

    1. Expand the Utilities feature dataset, right-click on "Utilities_Net_Junctions", and choose Properties. This will open the properties for network junctions. Click on the Fields tab and enter a Field Name called "type" under Enabled, specify the Data Type in the empty field to the right as Short Integer and in the window below make an Alias called "junction type". (see below). Click Apply, then OK when you are done.

Note: if ArcCatalog does not allow you to enter a new Field Name "type", close ArcCatalog, restart it and open the "City" geodatabase again, and repeat Step 1.

 

    2. Reopen the properties for "Utilities_Net_Junctions" by double clicking on it. Click the Subtypes tab. In the pull down to the right of Subtype Field select the "type" field that you created in the previous step. (If you just click Apply and not OK after creating the new field in step 1 above, it won’t appear in the subtypes dropdown , you have to reopen it … and it has to be a short integer to be recognized in subtypes).

    3. For the Subtype Field "type", enter the following categories listed in the table below. Set Unknown as default for all of them. In previous releases of the software, using the Tab key to go back and forth between the Code and Description columns occasionally cause problems when saving.  To be safe, you may want to click in each individual cell as opposed to using the Tab key.  Click Apply when you are done.
 
Code Description
0 Unknown
1 House line / main pipe junction
2 Meter / house pipe junction
3 Drain / house pipe junction
4 Cap (end of pipe)

4. Click OK.

5. Right-click on "pipes" (inside the Utilities feature dataset) and open Properties. Click the Subtypes tab. For Subtype Field, use the pull down to select the "Type" field. Set up the subtypes for the type field in "pipes" in the same way you did above. Click Apply when you are done, then click OK to close the window.
 
Code Description
0 Unknown
1 Main line
2 House line (in)
3 House line (out)




Step 6 - Set the domain

Define attribute domains.

    1. Right click on the "City" geodatabase, select Properties, and click on the Domains tab.

    2. For Domain Name, under the EnabledDomans field, enter "Cost" and in the Description field enter "Value of parcel (in dollars)".  In the Domain Properties area below change the Field Type to Long Integer (if it isn't already there), change the Domain Type to Range, Minimum value = 0, Maximum value = 500000, Split policy = Geometry ratio,  Merge policy = Sum values.

(Note: there is a potential issue if you remove the EnabledDomain domain at the top. If after you make your new domain, then reopen the attributes dialog box, you can get rid of the EnabledDomain and then it will work fine.)

3. Click Apply, then click OK to close the window.


Step 7 - Define the table relationships

Set up table relationships between parcels and owners.

1. In ArcCatalog's left-hand panel, select the landUse feature dataset, then right-click on it and choose New -> Relationship Class
2. Name of the relationship class "Parcel owners"
3. In this next step you will select the entities participating in the relationship.

i. In the Origin table/feature class window, expand "landUse" and highlight "parcels"
ii. In the Destination table/feature class window below, highlight "owners"

3. Click Next. A simple (peer to peer) relationship will be selected by default, which is fine. Click Next again.
4. Set the propagation direction, "Forward (origin to destination)", and click Next.

5. Set the general cardinality, choose "1-M (one to many)" and click Next.
6. Select No to bypass adding attributes to the relationship, and click Next again.
7. Select APN in the pull down for both the primary and the foreign key fields. Click Next.
8. Review the relationship summary panel and the click Finish. Notice the new icon under the landUse feature dataset.


9. In ArcCatalog's left-hand panel, right-click on the Parcel owners relationship class and choose Properties.  From the Rules tab of the Relationship Class Properties dialog box, you need to link parcels (in the upper left sub-panel) with owners (in the lower left sub-panel). To do this, highlight parcels then check the box next to owners, and then highlight owners as well.


10. Finally, set the specific cardinality for the Parcel owners relationship.  Check the range of associated objects box and set the following properties:  Origin Cardinality Min = 0 and Max = 1 (in the upper right sub-panel) and Destination Cardinality Min = 1 and Max = 3 (in the lower right sub-panel). Note: Max must be greater than 1 in order to set Min to 1.


11. Click Apply, then click OK to close the window.


Step 8 - Define the validation rules

Set up validation rules for the geodatabase.

Under the Utilities dataset, right-click on the network (Utilities_Net), choose Properties, and click on the Connectivity tab. (see below).

1. "House lines (in)" can connect to between 1 and 4 meters (meter/house line junction).  You will set this in the following steps.

    a. With the Connectivity rules for the "pipes" feature class selected, in the upper-left Subtypes panel highlight "house line (in)".

    b. In the bottom panel, check the check box next to Utilities_Net_Junctions.

    c. Expand the contents of Utilities_Net_Junctions and uncheck everything but "Meter / house pipe junction"

    d. Right-click on "Meter / house pipe junction" and choose "Set as default", a blue "D" will appear next to it. (see below) This means that while digitizing features into this feature class, whenever a "house line (in)" is created the end junction will default to being a meter.

    d. Now we need to set the Cardinality for the "Meter / house pipe junction". To do this, highlight it and the checkbox for Cardinality on the right side of the window will become active. Check the box that pertains to the lower one (number of junctions an edge can connect to) and set Min = 1 and Max = 4.  Remember, Max must be greater than 1 in order to set Min to 1. This specifies the number of junctions (meters are junctions) and edges (pipe is an edge).

2. House lines and main lines must join through the correct junction (house line / main line junction).  You will set this in the next steps.

    a. With the Connectivity rules for the "pipes" feature class still selected, highlight the subtype you defined earlier called "house line (in)".

    b. In the bottom field, link the Subtypes in the Network by expanding the content of "pipes" and check Main line. Highlight Main line and the Junction subtypes window to the right will become active. Expand Utilities_Net_Junctions and check on "House line / main pipe junction" under it. Notice that a "D" appears next to it after you do this. This means that the default junction when house line (in) and main line meet will be a house line/main line junction. Also check the "Meter / house pipe junction". (see below)

3. Main lines must be capped, with the other lines caps should be valid junctions.  You will do this in the following steps.

    a. Cap should be default for main lines. Highlight "Main Line" under Subtypes in this feature class, check on Main line under the "pipes" Subtype, and select Cap (end of pipe) under the Junction subtypes.

4. Lines out must start at a "drain/house line junction".  You will do this in the following steps. 

    a. Highlight "House line (out)" in the top window, in the bottom window under Utilities_Net_Junctions check "drain/house pipe junction" as the default for "house line (out)" to do this right click-on it and choose set as default. (see below)

b. Click Apply and OK to Close the Properties window.


Step 9 - Back up your geodatabase!

Before you go any further, confirm that your geodatabase is present on your removable disk (Zip, jump drive, etc.). If it is not, save a copy of it there. You will need it for the second half of this lab assignment.


Step 10 - Draw UML

Now that the framework of the geodatabase is (finally!) complete, you will need to diagram it out as a reference.

 

Diagram 1 for Lab 3:
Draw a UML diagram of the "City" geodatabase. Feel free to use any references you want for this, the book is a good place to start and it was reviewed in lecture. You should also consult the Lecture Webpage for any notes (or example graphics) on this subject.


3.1 Wrap-up of Exercise I

Did all of this make sense? Do not feel overwhelmed if it did not. Creating a geodatabase, even a simple one like this, is a complex process. You may now understand why it is important to lay out the design of a database before you actually make it!

Take a break for a bit before we move on. In the next section, you will be digitizing features into the geodatabase that you just created.

 

Question 2:
a) What is a feature dataset vs. a feature class? (give an example)

b) Step 3 asked you to enter an alias for the "pipes" feature class. What might be the purpose of an alias if the Name field is already there?

c) The last part of Step 4 instructed you to import a table from a text file. Use the Preview in ArcCatalog to look at the contents of the textfile. What are the six column headings? (their names) and what type of information do they contain? (text or strings)

d) In Step 6 you defined Domain Properties for the geodatabase. What options did you specify for the split and merge policy? What do these mean?

e) In Step 7 when you defined the Relationship Class for parcel to owners, you had to specify if the relationship class would store a Simple (peer to peer) relationship or a Composite relationship. What is the difference between these two? Give an example of where a Composite relationship would be useful.

f) What is cardinality?

g) In Step 7 when you defined the Relationship Class for parcel to owners, you had to specify the cardinality as 1-M. What does this mean in terms of the relationship between owners and parcels? Why did you specify the numbers you did? Why aren't they the same for both the origin and destination?

h) Explain the concept of primary and foreign keys. (In Step 7 when you defined the Relationship Class for parcel to owners, one of the last steps was to specify the primary and foreign key.)

i) What is the purpose of default values?

j) What is the purpose of validation rules?



Exercise II

4.0 Populating a geodatabase

4.1 Introduction and data

In the previous section, you created a simple geodatabase data model for a utility network.  In this section you will populate the geodatabase with specific geographic features.

To begin, download the necessary data sets:

  • Download the data (right-click, Save As) to your "Lab_3" folder.  Right click the zip file and choose Extract here, or use winzip if you have it.  After the files have been unzipped/extracted you should have several new files in the folder.
  • Notice the new data in Lab_3. There should be 4 files if you are viewing them with Windows explorer.

  • - parcel.tif, and files associated with it (parcels.aux, parcels.tif.xml, and parcels.rrd)
    You can view the data in ArcCatalog.

4.2 Georeferencing an image

We are going to take a slight departure for a moment to prepare for digitizing features into our new geodatabase. As you may 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 map layer. (This is often the most efficient and straightforward, though not always accurate, means of importing data from one GIS format to another.) You will now prepare just such a background image that you will then use to guide you in digitizing a land parcel feature class.

Step 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.

If you have not already copied the data onto your computer, do so now.

Start ArcMap and add the "parcel.tif" 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.

 
Question 3:
a) When you add parcel.tif an ArcMap warning box appears - why? What does it mean?

b) Why was the scanned image automatically placed where it is?

In order to use the image with the geodatabase created in the last lab, 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.

You will 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. Right-click on "Layer" at the very top of the Table of Contents and choose Properties, then click on the Coordinate System tab. Recall from the previous exercise that the projection we are using is NAD 27 State Plane for California Zone 5. In the "Select a coordinate system" panel (lower half of the window) go through the folder tree to Predefined -> Projected Coordinate Systems -> State Plane -> NAD 1927 and double-click on NAD 1927 StatePlane California V FIPS 0405. Click Apply, then OK to close the window. (If "parcel.tif" has disappeared, 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 which will help you to assign spatial reference information to map layers.  Display the toolbar by right-clicking anywhere on the blank grey space at the top of ArcMap and making sure that the "Georeferencing" item has a check next to it by clicking on it (this will ensure that the toolbar is displayed for use). 

You will see a toolbar that looks like this:


 
Question 4:
On the Georeferencing toolbar, explain the function of each of the options under Georeferencing:

a) Update georeferencing
b) Rectify

c) Fit to display

d) Flip or rotate

e) Transformation

f) Auto adjust

g) Update display

h) Delete control points

i) Reset transformation

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 instance the example below shows a rectangle A1, B1, C1, D1 being transformed to its proper coordinates at A2, B2, C2, D2.  The table next to it shows the coordinate transformations taking place. 


Step 2 - Georeferencing the data 

Georeferencing the "parcel.tif" image is a simple process of selecting control points on the image that can be referenced to the appropriate coordinate system.  This can be done in two main ways:

  • If you have another, coincident dataset (e.g. streets) that already has a coordinate system assigned, you can match up selected locations (control points) on the image with the corresponding locations in that dataset.
  • If you do not have another dataset, you can use GPS to find the coordinates of the selected locations in the real world and then input those coordinates in lieu of matched points.  
Since you don't have any existing data in your geodatabase, you will need to use the second option (except the GPS coordinates will be provided for you).  You will use five control points that have been preselected (see image below).

To georeference the image, click on the "Add Control Points" button on the georeferencing toolbar.  Your mouse pointer will turn into crosshairs. 

Zoom into the first point (X1 in the image above), activate the "Add Control Points" button and place the crosshairs on the intersection of the two lines.  When you 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.

If you had reference data (such as the streets data mentioned at the beginning of step 2) you would simply zoom to the reference dataset and click on the corresponding location in the reference data.  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 reference data, you must manually input data that has been gathered for you.  After clicking on the first control point, right-click and select "input X and Y."

This will open a window for you to enter the coordinates for that control point.  For each of the control points, you will enter data by copy/pasting from the following table or carefully typing in the new coordinates:
 
Control point New X coordinate New Y coordinate
X1 1786095 624300
X2 1787416 624300
X3 1786481 623882
X4 1786738 624170
X5 1787371 623781

As you enter the data, the image will automatically move to fit the new coordinates. (If it moves offscreen, click on the Full Extent tool on the Tools toolbar to shift the display to the image's new location.) When you are finished, click on Georeferencing -> Update georeferencing to save the new location with the parcels.tif image.
 

4.3 Digitizing 

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

Add the "parcels" feature class from your geodatabase. 

Since you will be editing the parcels feature class, turn on the editor toolbar.  You can right click on any empty grey space to display the list of toolbar.  (Alternatively, instead of right-clicking on the toolbar, you can simply click on the editor toolbar icon).

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. Using the Create New Feature tool (it looks like a pencil).

 

Zoom in to the first parcel (parcel #20) in the upper left corner of the base image. With the Create New Feature 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.

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.

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

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.

You could digitize the adjacent polygons the same way, but no matter how careful you were, the edges would not exactly match, and the polygons would "sliver". 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 your having to digitize them.  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.

You can close the Snapping Environment window when you are done.

With the Create New Features tool selected, digitize the remaining polygons - remembering that 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). 

There are three options for finishing a feature that you are sketching:

  1. Double click
  2. Right click away from the last vertex digitized and select "Finish Sketch" from the context menu
  3. Click F2 on your keyboard

As you digitize the polygons you can enter their attribute information by clicking on the Attributes button on the editor toolbar when the newly digitized polygon is selected.

The APN (Assessor's Parcel Number) for each polygon will take the form: 52-015-parcel# where parcel# is the number in the circle inside each polygon.  If you prefer, you can enter the attribute information for all of the polygons after you have finished digitizing.

Note: Occasionally, ArcMap may stubbornly refuse to let you split a polygon. To remedy this, save your edits, choose stop editing, and then start editing again.

On parts of the map where there are curves in the polygon that you are digitizing, you can use the Arc tool (hold the mouse button down on the Create New Features tool to see this option) to make the appropriate curves in the feature. 

Of course you could be lazy 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, then when you get to the curve, select the Curve tool from the pulldown window and then digitize the feature.

If you did not already assign APNs to the polygons, do so now.  Be sure to save your edits.
 

4.4 Calculation of attributes

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

The georeferenced data are in feet, so the area calculation that is automatically done 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 dataset (on the main ArcMap menu click on Selection -> Clear selected features).

In ArcMap right-click on Parcels, choose Open Attribute Table. In the table, right-click on the "Size of parcel" column and select Field Calculator. Remember, the column name you see is the alias you set earlier.  The actual column or field name is Acres.

To calculate the "Acres" column, double click SHAPE_Area so that it appears in the bottom panel, click the "/" button, and then type in 43560. Click OK.


 
Question 5:
What formula did you enter to convert square feet into acres?

How many square feet are there in an acre?

It is very helpful to know how to calculate values in a table.  In addition to converting the square feet into acres using the field calculator, you can also use the Calculate Geometry option which is listed on the same context menu.  The Calculate Geometry window will also allow you to calculate the perimeter, and the X and Y coordinates of the centroid of each polygon.

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 million-dollar 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.  We will use the second option.

Right-click on the Cost field which has the alias "Land value (in dollars)" and select the Field Calculator from the context menu.  Clear the formula you used earlier to calculate the acres.  Instead of using the basic calculation functions as you did to calculate the acreage, check the Advanced box.  The Calculate Values window will now show the Pre-Logic VBA Script Code text box.  Copy and paste the following into that 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.

Click OK to calculate the values.  Save your edits to the table by selecting Save Edits from the editor toolbar drop down list.
  
If the Field Calculator will not let you add values or divide you may need to change Type from Number (the default) to String.

4.5 Validation

Now that you have a complete parcel dataset, you need to validate it. Select all of the parcels and click on  Editor -> Validate selection. If a feature is invalid, it will remain selected.  To determine why the feature is invalid, select the individual feature and click on Editor -> Validate selection.  This will open a window either saying that all features are valid, or it will explain the error.


 
Question 6:
What is the result of your validation?  Were there any invalid features?  If so, what were they?  How would you fix them?

Make appropriate changes to fix any invalid features -- your fixes do not need to reflect reality, you have complete power over this neighborhood. You may need to change the Domain of a field to fix these problems. You can do this through ArcCatalog -- right-click on "parcels", choose Properties, click on the Subtypes tab, and find the button called Domains. (Hint: Search Help for "domain", your problem may have something to do with "attribute validation".)

ArcGIS might not recognize your changes. If this happens (you change the Domain and you still get a validation error) you may need to restart ArcMap.

4.6  Merge and split policies

When the geodatabase was created, merge and split rules were set for the property value domain.

To explore these, select the largest polygon in the dataset and use the Cut Polygon Features tool to split it into two parts.  Use the Cut Polygon tool to draw a line all the way across the polygon that you have selected.  Save your edits.
 
Question 7:
What happened in the parcels attribute table when you split the features?  Do the new values seem correct? Explain.

With both of the new polygons that you created selected, click on Editor->Merge to merge them back into one parcel.
 
Question 8:
What happened in the parcels attribute table when you merged the features?

Do the new values seem correct?  If they do not, what do you think went wrong?

To find out more about what might have happened with the merge policy, search the ESRI Online Support Center (http://support.esri.com) to see if there are any notes about it.

The ESRI support center is a good site to visit if you are having ArcGIS problems that don't seem to make sense.  It may be that other people are having the same problem, and perhaps a solution is available.
 
 

4.7 Digitizing a basic pipe network

You have now finished digitizing the parcels polygons. Now you have to digitize the pipes.

Save and Remove the "parcels" feature dataset from ArcMap. Add the "Utilities" feature dataset which contains the network.  When you add the feature dataset, it will automatically add the pipes and  the junctions.

ArcGIS may not allow you to digitize lines in to the "pipes" feature dataset, if this happens you need to Remove the parcels feature dataset and even close ArcMap. To make sure that "pipes" is set as the feature dataset that is being edited add it first, the open it for editing, then add the parcels as the background coverage.

Start editing.  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 metered water line going in and one line going out.
  • The largest parcel is an apartment complex and needs four water meters on the line in.
  • All of the pipe junctions (except for main line to main line connections) must be at right angles.
  • If you wish, you may include parcels for the water district (supplying the water), and the water treatment plant.

Setting feature types (very important!): You will need to set the appropriate feature type in the Target drop-down menu of the Editor toolbar as you digitize each part of the network. To change the type of a given feature after it has been digitized, select it with the Edit Tool then right-click and choose Attributes. The type (and other attributes) will be listed in the right-hand column, and you can change it 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.

Making right angles: Click on the line that you are connecting to. Right after you make the first point in your line, right-click and select Perpendicular.

An example of a digitized network is seen below.  Your network does not need to look like this example.


 
Map 1 for Lab 3:
Make a map of your network to turn in.

On the map, describe your data sources:
1) a general description of the geodatabase: its intended purpose, feature types and descriptions
2) the projection location, zone, coordinate units, etc.
3) metadata about the features themselves; original data sources, number of features (lines-points-polygons), original source scale and date (if it is unknown, say so!)



5.0 Conclusion

In this lab you have worked directly with the geodatabase, an important new data structure for ArcGIS. You have learned the procedure for designing and setting up a geodatabase. You have also stepped through populating a geodatabase, validating the data, and fixing errors in the dataset.


6.0 To turn in

  • The question sheet, with typed answers (Word document)
  • One UML diagram of the geodatabase
  • One map of the neighborhood pipe network

Created by Sean Benison and Jordan Hastings

Based on previous labs by Nicholas Matzke, Sarah Battersby and Jeff Hemphill
UC Santa Barbara, Department of Geography

© 2000-2007 Regents of the University of California

This page was last modified on Jan. 28, 2008 by Indy Hurt