EXERCISE 9– DIGITIZING:
DOING IT YOUR OWN WAY

Environmental Resources 372:362

Intermediate Environmental Geomatics


Sometimes the data layer you need isn't already available and it's up to you to create it. In this lab, you'll learn how to take a base map such as an aerial photograph (preferably a digital orthophotograph that has been corrected for spatial distortion) and make a new geodatabase using this photograph as a backdrop. The process of creating data in this manner is called heads-up digitizing, and it's a whole lot better than the old way of digitizing using a digitizing tablet.

Why a geodatabase? Well, we want to create a layer that has topology, so shapefiles are out and the current version of ArcGIS doesn't allow us to edit coverages in ArcMap. Geodatabases are the future of ArcGIS, so gaining a little (and we do mean little) experience with them is a good idea.

I. Creating a new geodatabase:
We are interested in land use and land cover change within Hopewell Township, Mercer County, NJ. The local historical society would like us to map how the land has changed at the location of a new development between 1930 and 2002. Fortunately, the CRSSA Databank includes historic aerial photos, such as the 1930 photo we’ll be using today, as well as more current orthophotos.

First, create a new file geodatabase using ArcCatalog (be sure it is in your folder) and call it hopewell. What we've just created is a container that can hold any number of related data sets. Keep in mind that geodatabases are complicated structures, so to say that we are just scratching the surface is a gross understatement.

Right-click on your new geodatabase. Notice under the New menu we can create a number of different elements. We're going to create one feature data set that will eventually contain three feature classes. Feature data sets are used to hold feature classes that have the same spatial reference information (extent, coordinate system, etc.). A feature data set can contain feature classes of different geometries (i.e. polygons, points and lines). The only thing those feature classes must have in common is that they share the same spatial reference information.

Step 1: Create empty feature classes for digitizing
Create a new feature data set in the hopewell geodatabase, called landbase, and import a coordinate system from \\ad-rsc\data\teach\intgeo\ClassWork\hopewell\hopegeol. Accept the defaults for the Z coordinate system and the X, Y, Z tolerances.

Now we need to create three feature classes: one to show roads, one for 2002 land use/land cover, and one for 1930 land use/land cover.

Click Next. Add a field called Type. Make it data type Text, with a length of 30. Add another field called LUCode, data type Long Integer.  When you’re done adding the field, click Finish.

Step 2: Import reference data to geodatabase
Now we need to add the area of interest to the geodatabase. Remember, geodatabases can hold all types of data, including rasters.

II. Georeferencing
Open ArcMap and add studyarea from your geodatabase and the 1930 aerial photo (\\ad-rsc\data\teach\intgeo\ClassWork\hopewell\tile106_sub.tif) to the map. Also add \\ad-rsc\data\teach\intgeo\ClassWork\hopewell\772.jpg, which is a digital orthophoto quad, or DOQ, taken in 2002. Zoom to the study area, and change the symbology of studyarea so the fill is transparent. Toggle between the 1930 and 2002 photos. Notice anything? It looks like the images don’t quite match up, which will be a problem for making a really good comparison of land cover over time.

What to do? We need to georeference the 1930 image to the 2002 image so they match exactly. We know that the 2002 image is a good reference because it’s a digital orthophoto, while the 1930 image is actually a scanned photograph. Fortunately, ArcGIS comes with tool for this. Activate the Georeferencing Toolbar (View | Toolbars) in ArcMap. Turn on Auto Adjust in the Georeferencing pulldown. Select tile160_sub as the target layer.
Now we need to add control points to associate the same locations on each image. Click Add Control Points and View Link Table on the toolbar. As we add points, the link table will give us information about the accuracy of the transformation and allow us to delete bad points.

Start by finding a good spot where there is a clear landmark (e.g., road intersection) that hasn’t changed over time. Click on the landmark in the 1930 image first (a green cross appears), and then switch to the 2002 image and click on the same landmark (a red cross appears). You’ll see a blue line linking the two points. We need at least 3 points to georeference the image, though it’s a good idea to have one point at each corner. Watch the RMS Error as you go and remove any points with really large residual errors.

When you’re done, save a copy of the control points to your directory. Then go to Georeferencing | Rectify. Save the rectified image to the hopewell geodabatase and call it tile106_rect. Your geodatabase should look like this:

geodatabase structure

III. Digitizing & Editing
Now that the images match, we’re ready to digitize. Let’s start by digitizing major roads in the study area that haven’t changed over time. This will provide a visual reference for our land cover maps.

Bring your roads feature class into ArcMap. In ArcGIS, all digitizing occurs in within edit sessions. To start an edit session, click on the Editor button on the Editor toolbar and select Start Editing (you may need to add the Editor toolbar via View | Toolbars). If a data frame contains data from more than one workspace (think directory or folder), you have to select the workspace you're interested in editing. Make sure your target layer is roads in the toolbar. Explore the options (especially the 3-t's: tool, task and target) associated with the Editor toolbar – you will need to be sure you understand what they are before you proceed with your first digitizing endeavor.

For this task, we need to Create a New Feature using the icon that looks like a pencil (there are other choices there that you can explore later). Use your mouse to draw in the roads.

ArcGIS refers to your current edits to a feature as sketch. Double-clicking while drawing a sketch completes it and turns it into a feature.

We can make our lives a little easier if we make our new lines snap to an existing line. Snapping means that a new line will automatically connect with an existing line if it falls within the user-defined snapping tolerance.

Find the Snapping command on the Editor menu, choose the file you are digitizing and turn on all three snapping options (vertex, edge, and end) for both roads and study area. This way, our roads lines will snap to each other as well as to the study area boundary. Set the snapping tolerance to 15 map units under the General Tab in Editor | Options. Notice that when digitizing with the snapping tool turned on, the dot on the cursor jumps to lines you have already digitized (if this doesn't happen, increase your snapping tolerance or zoom in).

Continue to digitize all the major roads in the study area. You don't have to keep each road as separate a separate arc since in a geodatabase each arc gets split wherever it intersects another arc (how is this different than a shapefile?). This doesn't happen automatically, though. We have to explicitly create the topology. When you've digitized all the major roads in the area save your edits and stop editing.

IV. Cleaning up and creating topology

Even with greatest care, you are likely not to get all the nodes lined up - some of your lines will not be quite long enough and others will overshoot. Not only are over- and undershoots bad, they also mean that the topology of the geodatabase will not correctly reflect reality. These problems will (mostly) be corrected when we create the topology.

Any time you add features to a geodatabase you should create the topology. To do this, we first need access to the Topology toolbar. It can be found under More Editing Tools on the Editor menu. Start an editing session to activate the Topology toolbar.

First, we need to specify which feature class we want to participate in the map topology. Click the Map Topology button on the Topology toolbar and select roads to participate in map topology. The cluster tolerance controls how wide the window is to eliminate overshoots and undershoots. You want to make it large enough to catch the errors but not so large that it eliminates correct features, such as short, dead end roads. Let’s start with a tolerance of 5 feet.

To activate the tool we need, you first must select all the features in roads. Now click on the Planarize Lines button and input a cluster tolerance of 5 feet. This tool splits all the lines at intersection and creates topology for the feature class. If you had any over- or undershoots that were less than or equal to the cluster tolerance these were automatically cleaned up for you.
How did the cleaning process go? If you are not completely satisfied, you can increase the cluster tolerance to fix larger errors. Planarize lines again (don’t forget to select all features in roads), this time with a cluster tolerance of 20 feet. Notice how remaining over- and undershoots within the cluster tolerance snap together automatically. While this saves you some time, it also may shift the position of your lines up to 20 feet. Since we’re trying to digitize road centerlines, this is not acceptable. Click the undo button to get rid of these edits.

Instead, you can do some additional editing by deleting any remaining overshoots and extending undershoots. (Remember to check the snapping settings for the new layer you are about to edit.) For overshoots, click on the offending arc (with the select tool in edit mode) that overshoots and delete it. Undershoots are a bit of a different beast. Set the task to modify feature and click on the offending arc with the edit tool. You will now be able pick up the vertices and endpoints and move them where you want them. The arc you just extended should intersect another arc, but the receiving arc doesn't 'know' that it is now suppose to be two arcs and therefore the topology will not be correct. This means we need to Planarize Lines again once we finish our manual editing (don't forget to select all of the features first).

Assignment:
Create a map to show land use change for our study area in Hopewell Township. You have already created the polygon feature classes inside the geodatabase for both years, so now you need to digitize the polygons and input the appropriate land use classes as the attributes of your polygons. Landuse types you should use are:

Type

LU Code

Developed

1000

Cropland and Pastureland

2000

Forest

4000

Water

5000

Wetland

6000

Barren

7000

Create an appropriate map, including major roads as reference background data. Include a summary graph on the map that shows the area included in each landuse type for each year. (Look at the Options button on the summary table for graphing tools.) We’ll be extra impressed if you provide some change statistics, too.

Suggestions:

Digitize land use only within the study area, even if a feature continues outside of the area. Don't get too worked up about capturing the finest level of detail possible or you will drive yourself crazy.

Remember to be careful about your tasks and targets! Don't forget to set your snapping tolerance.

Explore other tasks and commands besides 'create a new feature'. 'Auto polygon complete' is particularly useful for creating new polygons adjacent to existing polygons. With this as the chosen task, start by clicking inside an existing polygon, draw your vertices and end up inside the same or another existing polygon and double click. Note that you can also merge adjacent polygons using the Editor menu if you have two adjacent polygons selected. If something doesn't work right or you make a mistake, don't forget about the undo command.

If you are feeling brave, try creating an attribute domain to save yourself some time typing in each land use type (see page 6 for directions).

Assignment due Monday, April 13th.

Extra Credit: Label the major roads on your map editing the attribute table of the roads feature class.

In the Fields tab of the Properties window for the roads feature class, add a field called Name. Make it type text with a length of 30 in the field properties at the bottom of the window. Add another field called RoadType (such as street, blvd or lane), type Text, with length of 10.

Let's see about filling in some of the information for these fields. Add the mertiger layer from the Hopewell directory and use it to identify the roads (notice the fit is not so good, hence one motivation to re-digitize these roads). If you didn't have a layer containing street names, how might you go about finding them?

Start an edit session and click the Attributes button to open attribute table editing. Select an arc in your road layer. Look at the attributes of this arc and enter the road name and road type. Remember that a single road may consist of several arcs, and you'll need to add the name to each arc.

 


Advanced Geodatabases: Attribute Domains (Optional)

This portion of the lab is completely optional. If you feel that you understand the material from lab, use this additional exercise to learn how to add an attribute domain to our land use layers. It is a potential time saver, so consider doing before digitizing the land use.

An attribute domain specifies rules that describe the legal values for a particular field in an attribute table. Attribute domains serve two primary functions: preventing errors in a feature class’s attributes and increasing the efficiency of creating a layer from scratch. Note that multiple feature classes and tables can share a particular attribute domain that we define, so we can use the same domain for both lulc2002 and lulc1930.

In ArcCatalog, right-click on your hopewell geodatabase and select Properties. In the Properties window, you are interested in the Domains tab. Click on the first empty field under Domain Name and type LandTypes for the name of your new domain. For the description, type Anderson Level 1 Land Use Types.

There are two types of domains. Range describes a valid range of numeric values for quantitative fields. Coded value describes a set of valid values for categorical fields. Since we’re creating a domain for land use type, we want a coded value domain so we can specify the only legal land use types. When we create the land use polygons later, we won’t be allowed to enter any land use types that aren’t included in the list of coded values.

Under Field Type, select Text. Note that we can specify a split policy. If we split a polygon into two separate polygons, what do we want to do with the land use type field? We want to automatically duplicate the land use type without having to type in attributes for the new polygons. Select Duplicate as the split policy. Leave the merge policy as default.

Now we need to type all of the valid values (codes) for land use types. We can also add a description of each code. When you finish typing in the codes, your window should look like this:

domain window

Click OK when you’ve checked over your inputs.

We still need to associate the LandTypes Domain with the Type field in the land use feature classes. This allows us to associate the same Domain definition with different fields in different feature classes so we can reuse the same domain.

To do this, right-click on lulc1930 and select Properties. In the Fields tab, click on the ‘Type’ field in the Field Name column. In the Field Properties at the bottom of the window, select LandTypes as the domain for the field. The Field Properties for the Type field should look like this:

specifying the domain for the Type field

Repeat for the Type field in lulc2002.

Now when you go to digitize the land use polygons in an Edit session, you can select the land use type from a dropdown menu in the Type field.

digitizing using domains