
Introduction to
Geographic Information Systems in Forest Resources |
Exercise: 3-D and Surface
Modeling and Analysis
Objectives:
- Derive slope and aspect surface grids from an elevation grid.
- Use surface analysis functions.
- Use 3D display functions.
- Create a new project
- Add surface model data themes to a view
Alter the legend for a TIN theme
- Derive slope and aspect grids
Derive a slope grid
Create a percent slope grid
Create an aspect grid
- Find steepest descent path
- Analyze line of sight and create surface profiles
- Create a viewshed
- Create 3D shapefile
- Create surface profiles from line features
- Create a 3D scene
- Display other (non-elevational) data in 3D
- Exporting 3D scenes as VRML
Create a new project
- Start ArcView with the startup project from the CD.
- Create a new project, rather than opening an existing one.
- Enable the 3D Analyst, Spatial Analyst, and Visibility
Tools extensions.
Add surface model data themes to a view
- Alter the legend for a TIN theme
- Open a new view. Rename the view to TIN.
- Add the dem grid data source from the packgis\forest directory.
- Add another theme, but this time make sure you use the scroll bar on the
Source Data Types pulldown to add TIN Data Source.
Add the pf_tin (TIN Data Source, on the CD in the packgis\cfr250
directory). The Pf_tin theme will load with random-colored breaklines,
but with a green > red > white elevation fill legend. Zoom into the
area shown by the red box below.

- Open the legend editor for Pf_tin.
- Click the Edit button for Lines to change the legend for Lines.
- Remove the Soft symbol.
- Change the Hard symbol to a thick black line.
Note that the hard breaklines are the stream segments. The TIN was developed
using various data sources, including the stream vector data as hard breaklines.
For more information on TIN creation and breaklines, see ArcView's on-line
documentation.
- Click the Edit button for Faces.
- Alter the classification to 64 equal-interval classes.
- Alter the color scheme to a smooth ramp from green to yellow to red.
(Click Apply).

- Uncheck the Illuminate Faces checkbox.

Do you see how shading makes a big difference in the appearance of surface
models? Shading is what allows the eye to interpret a surface as a 3-dimensional
object.
- Alter the Faces legend to show the Legend for Slope in
the Red monochromatic color ramp. Make sure to turn Illuminate Faces
back on.

- Now display the Faces with the Aspect Legend
- Classify the legend into 64 equal-interval classes.
- Make the first and last (top & bottom in fill palette) symbols
in the view green.
- Make the middle symbol in the list red.
- Click the Color Ramp button, and Apply the change.
Now south-facing triangles are red, and north-facing triangles are
green, with intermediate triangles shaded somewhere between green
and red.
You have just loaded and altered the legend properties for a TIN. Why do you
think each triangle appears with a single shade? What feature of the TIN model
makes this so?
TINs are used in addition to grids as data sets representing surfaces. Certain
surface functions in ArcView act only on TIN surfaces, and not on grid surfaces.
Derive slope and aspect grids
- Derive a degree slope grid
- Zoom back out to full view.
- Set the Analysis > Analysis Extent and Cell Size to Same as Dem.
- Make the Dem theme active.
- From the Surface menu, select Derive Slope.
- Display the new theme in 64 classes, with the Blue monochromatic color ramp
(use no symbol for the No Data class).

- Create a percent slope grid
Percent slope is defined as (rise / run * 100%). Many professions use percent
slope for calculations rather than degree slope. The following image shows
how percent and degree slopes are defined:

- From the Analysis menu, select Map Calculator.
- Create a calculation to convert degree slope to percent (I suggest copy-and-paste
from the browser).
( ( ( ( [Slope of Dem] * 3.14159 / 180 ) ).Tan ) * 100 )
What is the basis for this conversion (why does it work)?
- Although the new grid looks the same as the original slope grid, the values
have been rescaled.
Examine the values of the new grid. They should be in a different range than
the degree values.

- Make the dem grid active.
- From the Surface menu, select Derive Aspect.
- Display the Aspect grid in the same color scheme that was used for
the TIN in the previous section.

Slope and aspect are often used for vegetation and habitat modeling. They are
also used for all types of other land-use planning, management, and development
regulations.
Find steepest descent path
- Select Window > Show Symbol Window and make the default line symbol
a thick magenta line. All subsequent added graphical lines will use this symbol.

- Make the Pf_tin theme active.
- Click the Surface Tools pulldown (note that this is set to the Contour
tool
by default)
to enable the Steepest Path tool
.
- Add the Streams theme, and zoom in to the 27 Creek area.
- Click on the beginning of one of the forks the headwaters of 27 Creek. A
thick magenta line should trace the path downstream until the TIN levels
off. Notice how an anomaly in the TIN causes the stream to jump from 27 Creek
to the Little Mashel. Also notice that the lines are added as simple graphics
rather than as feature themes. However, the lines can be converted to features
later.

Note how the steepest path "jumps" from one stream to another. You
should recognize this surface model error from the exercise on hydrologic
modeling.
- Click again at the lower end of the first line to create another downstream
line.
Continue the process until the line goes off the display extent.

- Select all the graphics that were just added (Edit > Select All Graphics)
and then union them together (Edit > Union Graphics). This will
make a single graphic shape from the component parts.
- Select all graphics again. From the Edit menu, choose Copy Graphics.
This places a copy of the graphic line shape in the Windows clipboard.
- From the View menu, select New Theme. Make the new theme a
line feature type, and save it as 27_crk_2d. This is a regular 2D shapefile
of 27 Creek and part of the Mashel River. The new theme will be added and
open for editing.
- Choose Edit > Paste to paste the graphical line from the Windows
clipboard into the new theme. You have just added a graphic line as a feature
to a new theme.
- Choose Theme > Stop Editing and save all edits. This theme will
be used later in a 3D display.
- To make the new theme clearly visible, delete all the graphics from the
view (Edit > Select All Graphics, then <DELETE>)
This example finds the steepest downward path for a stream. Similar analyses
can be used to determine lowest-cost pathways for surfaces that represent features
other than elevation. Can you think of any other applications for this analysis
technique, using grid data other than elevation?
Analyze line of sight and create surface profiles
- Make the Dem theme active.
- Click the Line of Sight
tool in the Surface
Tools dropdown.
- Change the observer height offset to 6 (feet). You can alter the offsets
if the target or observer is higher than the default value.

- Click and drag a line from a high point on the DEM to a spot across the
Mashel River.
After a few moments, a line will be drawn on the view (selected as a simple
graphic), showing the line of sight between the viewer and the target. The
status bar will also tell you if the target is visible or not.
Your line will be different, but should look somewhat similar to this one:

- Keep the graphic selected in the view.
- Open a new Layout.
- From the Layout menu, choose Hide Grid.
- From the Layout menu, select Page Setup. Click the landscape
orientation icon, and OK the change.

- Click the Profile Graph tool
, and drag a box in
the layout. This will create a surface profile chart on the layout.
The box will be the size of the actual chart. Because you will need room for
text (which is added above the chart), make the box smaller than the full
layout page, or the text will fall off the layout page.
- Accept all the defaults, except the Vertical Exaggeration. (Click
the Set radio button and enter an Exaggeration value of 10,
which will make elevation differences in the surface cross section easier
to see.) Click OK.

- After a few moments, a chart will appear in the Layout containing a surface
profile of the line of sight. Visible places are shown in green, and places
that are not visible are shown in red. Elevations are shown on the Y-axis,
and planimetric distance is shown on the X-axis. A dashed line shows the actual
line of sight between the observer and the target.

- The alternate way of generating line of sight is to use the other Line
of Sight tool (
). Instead
of creating a line of sight which can be used to generate a surface profile
in a layout, this tool creates a new view containing a surface profile.
- Make sure to delete any graphics on the view (Edit > Select All Graphics;
<DELETE> ).
- Click the Line of Sight tool (
). You
will get a dialog box asking which surface to create the profile for. Choose
Dem.

- Set the Visibility Parameters as you did before.

- Drag a line across the grid theme in the view. Make sure that your line
starts and ends on cells containing data values. After a few moments, a new
view will appear.

This view contains the surface profile based on the straight line between
the endpoints of the line you defined. In this case, you can create a surface
profile without needing to use a layout. The contents of this view is a series
of simple graphic objects. You can alter the properties of each one of the
objects, for example, you can change the font face or the color of the profile
lines.
You have just created a line of sight between two points. This also includes
the functionality to create cross-sectional surface profiles, which is probably
more useful than just line of sight.
Create a viewshed
- Make the View active.
- Zoom out to full view.
- Create a new point theme called vis_point.
- Add a single point somewhere within the bounds of the surface models. (Your
point can be anywhere, not necessarily at the place I chose).
- Zoom into an area around this point and set the Analysis Extent to Current
Display (to speed up processing).

- Make both the Dem theme and the Vis_point theme active.
- From the Surface menu, select Calculate Viewshed.
- Eventually a new grid will be added to the view, which shows areas visible
(green) and areas not visible (red) from the observer point. Remember that
your viewshed will look different from mine.

- Convert the grid to a polygon theme (Theme > Convert to Shapefile)
called Vis_poly. Make sure you know which theme is active before you
convert to shapefile, or you might get a junk shapefile.
- Turn off all other grid themes.
- Create and display a hillshaded grid from the dem theme (Surface
> Compute Hillshade, and accept the defaults).
- Alter the legend for Vis_poly.
- Display Unique Values of the Gridcode field.
- Delete the symbol for value 0.
- Alter the fill symbol for value 1, making the fill pattern a cross-hatch.
- Choose a color for the Outline, and use the same color for the Foreground.
- Use no symbol for the Background. This will make a semi-transparent
hatch fill symbol.

Based on the underlying elevation grid, the area visible from the point
should look reasonable.
Certain planning and management objectives need to consider visual impact of
activities. It is possible to generate the areas visible from a single point
or a number of points (for example, you could place points along a highway to
determine what parts of the landscape are visible from the road).
Create a 3D shapefile
- Make the 27_crk_2d theme active.
- From the Theme menu, select Convert to 3D Shapefile.
- Take Z-coordinate from the Dem grid theme.


- Select a sampling distance of 10 feet.

- Call the new theme 27_crk_3d.shp. Add the shapefile to the view.
You have just created a 3-D shapefile. The sampling distance sets the density
of elevation sampling along the line, in essence creating a series of vertices,
each of which will have Z values in addition to X and Y coordinate values. On
a 2_D view, the new shapefile does not appear any different, but it is quite
different, which you shall see shortly.
Create surface profiles from line features
- Open a new view.
- Add the Streams and Boundary themes to the view.
- Select the main stem of 27 Creek, as shown below:

- From the Theme menu, select Convert to 3D Shapefile, following
the same basic instructions as before
- Get the Z-values from the surface Dem.
- Use a sampling distance of 10 feet.
- Call the new shapefile 27_crk_profile.shp.
- Add the new theme to the view.
- Start editing the theme.
- Select all the lines in the theme, and then select Union Features
from the Edit menu.
- Stop editing the theme, and save all edits.
- Make sure that the new theme is active.
- Create a new layout
- Select Layout > Hide Grid.
- Select Landscape orientation from Layout > Page Setup.
- Click the Profile Graph tool
, then click and drag
a rectangle in the layout.
- Alter the Title and Axis Labels in the Profile Graph Properties
dialog.

- OK the changes and a chart will be added to the layout, showing the
cross-sectional profile of the stream channel.
In the previous surface cross section, the line defining the cross section
was defined planimetrically as a straight line drawn between two points. In
this case, the surface cross section line is defined planimetrically as a curved
line (the flow path of 27 Creek). This functionality allows you to see the surface
elevation at various places along a curved line, such as a road or stream.
Advanced (optional) exercise: create a table representing line cross sections
- Download and save the Avnue script source View.SurfaceCrossSectionAsTable.
- Create a new script document and load the script source into the script
document (Script > Load Text File).
- Compile the script (Script > Compile).
- Make sure that your view contains a TIN theme and a line theme.
- Select a single line or a series of lines from a line theme in your view.
- Position your document windows so that both the view and script windows
are visible. Make sure that your view document is the active window.
- Switch active windows so that the script window is now active, without
activating any other windows.
- Run the script to create the surface cross section table ( this will be
called sxcn.dbf in your current working directory, where n
is the run number for each run of the script).
- Open the resultant dBase file in Excel and create a better chart than the
ones automatcially created by ArcView.

Display landscape data in 3D
- From the Project Window, double-click on 3D Scenes. A new
3D scene will appear.
- Select 3D Scene > Properties from the menu.
- Alter the Background Color to be white


- Add the grid theme Dem. Alter the legend to a 64-color green >
yellow > red ramp, as you have done before in Raster Analysis
I.
- Hide the legend (Theme > Hide Legend) so that it does not take
up too much space on the Table of Contents.
- Select Theme > 3D Properties.
- Assign a base height from the Surface itself (dem).
- Use a Z factor of 3 (for vertical exaggeration).
- Check the Show shading for features box (so that the theme will
have a 3-D look) and OK the change.

- Turn the theme on.

- Using the left mouse button, spin and tilt the surface model by moving the
mouse around.

- Using the right mouse button, zoom in and out by moving the mouse forward
and backward on the pad.

- Add the 3D shapefile 27_crk_3d.shp.
- Alter the theme's 3D properties so that the base heights come from
the Existing 3D Shapes, with a Z factor of 3, and an
Offset height of 20. The offset will make the shapefile stand
out against the background of the surface.

- Navigate to the location of the 27 Creek 3D shapefile.

- Add the 27_crk_profile.shp shapefile to the 3D scene, and navigate
to its location. Make sure that this theme's 3D properties are set exactly
like those of the 27 Creek theme.

- Add the Streams theme. Set the 3D properties to get Z-coordinates
from the Dem grid, with a Z factor of 3 and an offset of 20.

Zoom back out to full view and click the Rotate Viewer button
, and watch the surface model spin for a
while. Hit the <ESC> key to stop rotation.
You have just created a 3D scene and added data representing landscape features.
These scenes are very powerful displays of features normally seen only planimetrically.
Display other (non-elevational) data in 3D
- Create a new 3D scene.
- Add two copies of the cfi (plot centers) theme from the CD:\packgis\forest
directory.
- Alter the 3D Properties of the topmost theme so that the marker points will
be "floating" by the value equal to the conifer basal area * 10.

- Alter the second CFI theme 3D properties so that the markers will be extruded
by the value equal to the conifer basal area * 10. The two CFI themes will
create a composite 3D marker (one theme as "poles" and the other
theme as knobs at the ends of the poles).

- Add the themes Boundary (poly) and Stands (arc) from the CD.
- Alter 3D Theme Properties to make the base heights of both themes 0.
- Offset the Stands theme by 5 units.
- Turn off all themes except Bound, Stand and the two CFI plot
themes.

This displays a numeric attribute of CFI plots as a 3D value. It is easy to
see the location of plot centers with the greatest conifer volume, and where
these are in relation to stands. The data we are viewing have nothing to do
with elevation, but they are shown as though they do.
- Take the display of non-elevation data one step further.
- Create a new 3D scene, and add the Slope theme from a
previous step.
- Take the base height from the theme itself, and assign a Z factor of 20.
- Check the Show shading for features box.
- Alter the classification to one class, and select a gray shade symbol.
- Turn on the new theme and browse.
- The steepest areas (along the river valleys) appear raised in the 3D view,
and the flattest areas still appear flat.

This is a 3D display of data derived from elevation, but shown in a way that
is different than other 3D displays of elevation you may have seen. This results
in a map that might be meaningless, but using similar techniques on other
(non-elevation) data might result in something that is quite meaningful.
Displaying non-elevation data in 3 dimensions is a technique that can be used
to communicate values without needing any explanation other than the image and
the knowledge of the variable being displayed. What other kinds of data can
you think of to use in 3D display?
Exporting 3D scenes as VRML
- Create a 3D scene, and add a few themes (only add vector themes) to it.
Make sure to add a surface to make the view more interesting. Only use TIN
surfaces (rather than grid surfaces) for the sake of speed and file size.
Here is an example using data from ArcView tutorial data (usually located
at C:\esri\av_gis30\avtutor\3d\site2; if you don't have these data
on your computer, you can download and use the copy in 3D.zip).

- When the 3D scene is complete, select File > Export to VRML 2.0.
- Select a file name and location for the VRML file.
- Download this version of GLView.
- Unzip the GLView zipfile and double-click the GLView.exe file.
- "Read" your scene (e.g., scene1.wrl) in GLView.
Here is the same data set converted to VRML displayed in GLView:
- Experiment with the different tools in GLView to alter the view of your
data.