
Introduction to
Geographic Information Systems in Forest Resources |
Exercise: Vector Analysis
II
- Open a project
- Activate the Xtools Extension
- Activate the GeoProcessing Extension
- Merge
- Clip
- Identity
- Union
- Intersect
- Update geometry fields with Xtools
- Update
- Erase
- Buffering
Open a project
- Download the project v_an2.apr, and save
it on your removable disk.
- Open the Startup Project. Use it to open the project you just downloaded.
- Make sure to Set Working Directory to
your removable drive. Because you will be creating a number of new data sets,
this will save the time of you needing to navigate through a number of directories.
Activate the Xtools extension
If you use the startup project from the course CD, the Xtools extension will
be available.
Although ArcView 3.x has many built-in topological overlay tools, some are
not available in the GeoProcessing Wizard. However, thanks to Mike
DeLaune at the Oregon Department of
Forestry, there is an additional suite of topological overlay tools. Many
of the Xtools extensions work better than the GeoProcessing tools.
- From the File menu, select Extensions. At the bottom of the
list, you will see the Xtools extension.

- Check the box for the extension to enable it. Make sure you check the box
rather than simply highlighting the name of the extension.
- When the Xtools extension opens, a dialog will open. If you don't get this,
select Xtools > View/Change Xtools Defaults from the Project Window's
menu. Make any alterations to the dialog so that it matches this image:

- Close the Xtools Defaults dialog.
The Xtools defaults control how Xtools functions in default mode. We have selected
these values for the particular data we will be using (Pack Forest data, stored
in feet). If you want to change the default settings, you can at any time.
Activate the GeoProcessing Extension
- Make sure that the GeoProcessing Extension is also active.
The GeoProcessing extension performs many of the same operations as XTools.
Merge
Merging themes is used to join together themes that represent the same features
on the ground, but whose spatial extents are contiguous (for example, data which
are tiled by township). Merge appends all spatial features into one theme, and
creates a single attribute table.
- Download the file poca.exe.
- Double-click the file in the Windows Explorer to extract the file. This
contains shapefiles of Public Land Survey System (PLSS) data for two sections
in Washington State.
- Create a new view. Whenever a new view is opened while Xtools is active,
an information dialog will pop up, informing you of the current Xtools settings.
Close the dialog.

If you do not want to see these dialogs when you create a new view, alter
the XTools defaults.
- Add the two themes (poca1113 and poca1114).

These are the 2 Public Land Survey System (PLSS) townships that share common
space with Pack Forest.
- From the menu, choose View > GeoProcessing Wizard, and click the
Merge radio button, and then click the Next>> button.

- In the next Wizard window:
- Select both themes to merge.
- Accept the default Use fields from dropdown.

The Use fields from control instructs ArcView 3.x to use the attribute
table structure from the theme you specify in the dropdown. If attributes
exist for the same fields in any of the themes to be merged, those attributes
will be copied to the output theme attribute table. Those fields that
do not match will be dropped.
- Click the folder icon
, and save the new
theme as poca1314.shp.

- Click Finish.
- Turn the new theme on. You will see that features from both original themes
exist in the new theme.

- Open the theme table and scroll about halfway down. You will see that the
Town_id field values change from 1101401 to 1101301,
which verifies that the tables were also appended.
You have just merged together two themes that were previously stored separately.
Now all features of both original themes are present in the new theme. You can
use this technique when you have adjacent data sets that represent the same
features.
Clip
Back in Exercise 4,
we created a new theme of culvert inventory zones. When it was created, it was
made to go well outside the Pack Forest boundary.

Clip will now be used to limit the zones to the spatial extent of Pack Forest.
- If you do not have the culvert inventory zone shapefile, either digitize
one now (if you think you can do it quickly), get it here (culv_inv.shp), as a self-extracting executable.
- Extract the file to your removable drive after you download it.
- Make the Culverts and Boundary theme active in the Topology!
view. From the Edit menu, select Copy themes.
- Create a new view. From the menu, select Edit > Paste. This copies
the Culverts and Boundary themes from one view to another.
- Add the culv_inv.shp theme to the view. You now have several themes
in your new view.
- Use the GeoProcessing Wizard to Clip the culv_inv.shp theme.

- The input theme, which will be clipped, should be Culv_inv.shp.
The overlay theme (the cookie cutter) is Boundary.
Save the output in your working directory as culv_inv_zone.shp.

- The new theme will contain the same zones, but will be clipped down to the
same overall spatial extent as the entire Forest.

- Perform the same operation, but this time using the Xtools extension. From
the Xtools menu, select Clip with polygon(s).
- The input theme is Culv_inv.shp.

- The clip theme is Boundary.

- Name the output theme culv_inv_Xtools.shp.

- The new theme will look exactly the same as the first clipped theme.
However, there is a crucial difference.

- Make sure both clipped themes are active. Using the Identify tool, click
on one of the polygons.


- Note that the Xtools-generated theme has area and perimeter recalculated
automatically, whereas the GeoProcessing-generated theme does not have geometry
fields calculated at all.
You have just used a clip to limit the spatial extent of one polygon
theme based on the spatial extent of another polygon theme. Use this technique
when you need to limit one theme by the outer boundary of another. Sometimes
you need to perform mapping or analysis of a subset of your data. Rather than
using the entire larger data set, you can limit the extent in this way. Be careful,
because you can easily end up with several different data sets representing
the same area and same features.
Identity
Use identity to both limit the spatial extent of the output by the extent of
the identity theme, but also to associate all attributes from both input data
sets.
You will be creating a new National Wetlands Inventory theme that is limited
to the Pack Forest boundary, but which is also coded for all forest stand attributes.
- Make the Topology! view active, and turn on only the Nwi and Stands
themes.
- From the Xtools menu, choose Identity.
- Select Nwi as the theme containing the features to perform Identity
on.

- Select all fields in the input data set, either by clicking and dragging
with the <Shift> key, or using the <Shift> + OK
combination.

This instructs XTools to use all the fields from the Nwi theme in the
output theme table.
- Select Stands as the Identity theme.

- Select all fields in the output by using the <Shift> + OK combination.

This instructs XTools to use all input fields from the Stands theme
in the output attribute table.
- Name the new theme Nwi_new.

- The output theme looks similar to the Nwi theme, but every place
there is an overlap with the Stands theme, the Nwi_new.shp theme
will have attribute values from both the Nwi theme and the Stands
theme for the common area.
Where Nwi does not overlap with Stands, the Stands fields
will have a null string or value of 0. Where Nwi polygons overlap with
Stand polygons, new polygons are formed with new boundaries.
- Turn off all themes but the Stands and Nwi.shp themes. Zoom
into the western part of the forest (outlined below in red).

- Zoom farther in.

- Turn on the new theme. Notice how the geometry has changed (there are polygon
boundaries also from the Stands theme, though no features have been
lost).
Using the Identify tool, click the polygons for Nwi_new.shp
indicated above and examine the attribute values and how identity affects
these values. The Stands attribute values are all blank (for the string
fields) or 0 (for numeric fields). Click the polygon directly west of the
outlined polygon. For this polygon, the Stands field values have carried
from the original stand.
Note also that the geometry fields (area, perimeter) have been updated.
You have just created a new theme based on the overlap of two input themes.
If any areas overlap between the two input themes, the polygons representing
those areas have attribute values from both inputs. Where there is no overlap,
only the input attribute values exist. This technique is used to identify areas
Intersect
Contrast Intersect with Identity. The same themes will be used, Nwi
and Stands, but instead of an Identity, use an Intersect.
- Use the GeoProcessing Wizard and select Intersect two themes.

- Select the themes, Nwi and Stands, and call the output nwi_stand.

- The new theme will have all attributes from both source themes, with the
spatial extent limited to the area in common between the themes. New polygons
are formed with new boundaries here as well.
So Identity and Intersect are similar in what they do, except that the output
spatial extent differs. Where there is no overlap, polygon areas are deleted.
Update geometry fields with Xtools
- Zoom back to the location at the western part of the forest. Make the original
Nwi, the new Nwi_stand.shp, and the Stands themes active.

- Identify the polygon outlined in the image above. You will see that the
new theme contains attributes for both input themes. The new theme contains
2 attribute fields for area (Area and Area_; these are the original
fields from the input themes). Neither of these values are correct. How could
these values be correct, if this new polygon is smaller than the "parent"
polygons?
The reason is that the GeoProcessing extension does not automatically recalculate
geometry field values.
- From the Xtools menu, select Calculate Area, Perimeter, Area, Length,
Hectares.

- Select Nwi_stand.shp as the theme to update, and click OK.
Now identify the same polygon. Note that the original area fields have been
untouched. However, you will see a field called Area_Feet, which now
correctly represents the area of the new polygon. The original Area
field may appear to be missing, but it has simply been given a field alias,
which you can verify or change in Table > Properties.
Important Note: If you perform any activity
that alters the geometry of line or polygon features (e.g., overlay operation,
manual editing), you should use this functionality to update area, length, and
perimeter values. You will be asked to perform operations in assignments in
which feature geometry changes. If this is the case, make sure to use this functionality,
or your values will be incorrect!
Union
Union the Soils polygon theme and the Stands polygon theme.
- From the Xtools menu, select Union Polygon Themes.
- Select Stands as the union input theme.

- Click <SHIFT>+OK to bring all input theme attributes into the
output.

- Select Soils as the union theme.

- Click <SHIFT>+OK to bring all union theme attributes into the
output.

- Call the new theme stand_u_soil.shp.

- It will take some time for the process to complete. Be patient.
- Turn on the new theme. It will contain all features from both Soils
and Stands. New boundaries and intersections will be created at polygon
overlaps. It will also contain all attributes from both source themes. Where
polygons overlap, there will be values for both soil and stand attributes.

Note how much more complex this theme is than either of the 2 inputs. This
is because the new theme contains all spatial combinations from the original
themes.
- Arrange your themes so that you can see the extent of the Stands
theme and your new Stand_u_soil theme. Examine the polygon attributes
of the new theme at the edge of the extent of the stands theme. To see how
the Union function works.


- Try an identify on some of the polygons and you will see that the new theme
has both sets of attributes for all polygon boundaries from the input and
union themes.
Union is similar to Identity and Intersect, except that only a pair of polygon
themes can be unioned.
Identity and intersect can pair polygon themes with point or line themes as
well as with polygon themes.
Update
Use Update to replace the contents of one polygon theme with the contents
of another. Here, we will update the Soils theme with the Lakes
theme. This can be useful if you have a newer or more accurate data set that
you would like to use to replace parts of an existing data set.
- Add the Lakes theme from the CD to the view.
- From the Xtools menu, select Update Polygon Theme.
- Make Soils the Input Theme. This is the theme that will be
updated.

- Make Lakes the Update Theme. This is the theme that will replace
part of the input theme.

- Save the output theme as soil_up_lake.

- Make sure that the Lakes theme draws after the soil_up_lake.shp
theme. Make the soil_up_lake.shp theme active.
- Zoom into one of the lakes at Pack Forest.

- Turn off the Lakes theme.
You will notice that there is a new polygon created in the same space as the
lake's extent.

- Using the Identify tool
and click on the
place where the lake is. You will notice that there are no lake attributes,
and all the original soils attributes are set to 0 or null.
You have just replaced parts of one polygon theme with polygons from another
theme. Although new polygons exist in the replaced areas, the attribute values
have been removed.
Erase
Contrast Update with Erase. Erase removes the overlapping features
from the input theme. In this example, remove the Lakes areas completely
from the Soils theme.
- Select Erase Features from the Xtools menu.
- The Input Theme should be Soils, since this is what you want
to erase from.

- The Erase Theme should be Lakes, since this is what you want
to erase from Soils.

- Save the output as soil_no_lake.

- The theme will automatically be added to the view. Make sure it is a different
color than the Soil_up_lake.shp theme, so that you will be able to
see the difference.

- Now turn off the Soil_up_lake.shp and Stand_u_soil.shp themes.

The places where lakes were have been completely deleted from the Soils
theme. Compare this from the previous operation, Update, where replaced areas
have polygon features but no attributes.
You have just deleted parts of one polygon theme using polygons from another
theme. Anywhere there was overlap, areas have been removed.
Buffering
Create variable-width buffers around roads based on the road type.
- Create a new view.
- Add the Roads theme this view.
- In View > Properties, make sure to set Map Units to Feet
and Distance Units to Feet.
This is necessary so that ArcView 3.x will know what units to use for the
buffer distance.
- Create a summary table from the Roads theme table, using the Use
field..
- Open the Roads theme table.
- Make the Use field active.
- Choose Field > Summarize from the menu.
- Do not add any summary statistics (just click the OK button).

- Save the output as roads_use.dbf in your working directory.
The summary table is an easy way to get all the use classes from the roads
theme table. All these classes will be used to create the buffers.
- Open the new table for editing.
- Add the field Distance as a numeric field with a width of 2 and no
decimal places.
- Update the Distance values as shown in this table. These will be
the buffer distances.

- Stop editing the table and save the edit changes.
- Join the roads_use.dbf table to the Roads theme table, based on the
common field of Use. We are performing a join so that we can use Distance
(which is not in our original Roads theme table) to define the buffer
distance around each different road type.
- Make the view active, and select Create Buffers from the Theme
menu.
- Choose to buffer features of Roads.

- Buffer using the distance from the attribute field Distance. Make
sure to specify that Distance units are feet.

- Select Yes to Dissolve the barriers between buffers and save in a
new theme as road_buff.shp.

- Take this warning seriously.

If the buffer operation fails, try making the output theme on the hard drive
rather than on the removable drive.
- After the operation is complete, you can zoom in to verify that the variable
width buffers were created. Here, the Roads, Buffer, and Boundary
themes are displayed for maximum visibility. Note how the buffer distance
varies with the type of road buffered.
You have just created variable-width buffers of road features. The buffers
define an area that is a discrete distance from each buffered road segment.
Any vector feature can be buffered in this way. It is common to buffer features
in order to delineate areas of influence, or to create areas of altered land
use.