Home

 

 

 

   
 

GeoDesign

Tutorial 10 - 3D Analyst


Objectives:

  • Learn how to use ArcGIS 3D Analyst
  • To derive slope, aspect, and other surface grids from an elevation grid
  • To use surface analysis functions
  • Learn how to use 3D display functions with ArcScene

Background and Definitions

How is 3D Analyst used?

With the ArcGIS 3D Analyst extension, you can perform a variety of tasks such as:

  • Visualize your data in three dimensions
  • Creating surface models from different data sources (elevation, temperature…)
  • Determining height at any location on a surface
  • Finding out what is visible from an observation point
  • Calculating the volumetric difference between two surfaces (cut and fill)
  • Working with 3D vector features to make realistic models of the 3D world

Types of data used in 3D Analyst

1. Grids (raster data)
Raster data is a cell-based representation of map features called a grid. A grid is comprised of cells organized into rows and columns. Each cell in the structure has a value. A group of cells with the same value represents a feature. There is a value applied to each cell.

2. TINs (Triangulated irregular networks)
TINs represent surfaces using contiguous, non-overlapping triangle facets. One can estimate a surface value anywhere in the triangulation by averaging node values of nearby triangles, giving more weight and influence to those that are closer.

While the cell size of a grid is consistent throughout the entire grid, the size of the triangles in the TINs can vary. They are usually more detailed in areas where the surface is more complex and less detailed in areas where the surface is simpler.

A TIN dataset contains points with x, y, and z values and a series of edges joining these points to form triangles. The triangular mosaic forms a continuous faceted surface, which can be used to analyze and display terrain and other types of surfaces. TINs offer an alternative to the raster data model for representing surfaces.

In general, Grids tend to be used for smaller, regional applications while TINs are used for more detailed, larger scale applications.

Reference: Introducing ArcGIS 3D Analyst, ESRI Canada Limited, 2004


Setup

This Tutorial requires five datasets and one Excel table that can be downloaded here. Save and extract the zip file onto your personal space (a folder on your desktop, call it ex10).
hbefore (grid)
hafter (grid)
observation (point shapefile)
tracts.shp (polygons for all census tracts in Travis County)
tracts_pt.shp (the centroids for census tract polygons)
census.xls (Excel table contains census data)

The elevation grid hbefore is what Mount St. Helens looked like before the volcano erupted in 1980. The other one hafter is what Mount St. Helens looks like after the 1980 eruption.

Start ArcMap and from the ArcMap Getting Started window, choose “Blank Map.” (you may have to click My Template on the left panel, if you have existing maps you previously created, or you just click Cancel to start with a blank map.

From the Customize menu, choose Extensions and check 3D Analyst. Click Close.

Click on the Add Data button and navigate to ex10 folder, Add the hafter and hbefore grids to your table of contents.


Creating a Hillshade

Let’s take a quick look at what Mount St. Helens looks like when you apply an illumination to the surface. This will help you get a better idea of what the terrain looks like there.

Add the 3D Analyst toolbar by going to the Customize menu, then select Toolbars, and finally clicking beside 3D Analyst.

Make the hbefore grid the selected layer (appears in the dropdown box).

Open ArcToobox by clicking on the icon . Then double-click the 3D Analyst Tools and then double-click Raster Surface then Hillshade.

In the dialog box that appears, choose hbefore as the input raster, make sure the output raster is saved in your folder, name it hilshad_bef, leave the rest of settings as they are and click OK. A new grid will be added to the table of contents.

This is a hillshade of Mount St Helens before the eruption. The sun (illumination) angle is at 315 degrees (from the north west) and is at an altitude of 45 degrees.

Repeat the same steps as above and create a hillshade for the hafter grid, name the new grid hilshad_af. You might want to try playing around with different sun angles and altitudes.


Derive slope and aspect grids

You will learn to derive a degree slope grid.

In ArcToobox, double-click the 3D Analyst Tools and then double-click Raster Surface then Slope.

In the dialog box that appears, choose hbefore as the input raster, make sure the output raster is saved in your folder, name it slope_bef, choose DEGREE as the output measurement, leave the Z factor as 1 and click OK. A new grid will be added to the table of contents.

In the new slope grid, areas that are green are less steep; areas that are yellow to red are steeper.

Repeat the same steps as above and create a slope grid for the hafter grid.

Create an aspect grid

Aspect is the geographical direction toward which a slope faces, measured in degrees from north, in a clockwise direction.

Now, let's build a aspect grid.

In ArcToobox, double-click the 3D Analyst Tools and then double-click Raster Surface then Aspect.

In the dialog box that appears, choose hbefore as the input raster, make sure the output raster is saved in your folder, name it aspect_bef, and click OK. A new grid will be added to the table of contents.

The resulting aspect grid is shown below. Check the legend to identify the directions different colors represent.

Repeat the same steps as above and create an aspect grid for the hafter grid.


Converting to TIN

Converting a raster layer to a TIN allows us to work with the data in 3 dimensions, TINs are used in addition to grids as data sets representing surfaces. Certain surface modeling and analysis functions in ArcGIS act only on TIN surfaces, and not on grid surfaces.

We are going to do that for the two grids we have in the directory.

From the ArcToolbox, double-click 3D Analyst Tools, and then Conversion, then From raster, and finally double-click Raster to TIN.

In the dialog box that appears, select hbefore as the input raster, change the name of the output TIN to before_tin. Make sure that your TIN is being saved in your folder. Leave the z tolerance and other settings as it appears. Click OK.

Convert the hafter grid to a TIN as well. Call it after_tin. Zoom in to each of them and notice that they are now made up of a series of different sized triangles, not a regular grid of values.

Working in a 3D Scene

Click the ArcScene button in the 3D Analyst toolbar to open the 3D application. Click on the Add Data button . Select both the before and after TINs using the Ctrl key and add them to the 3D scene.

Using the Navigate tool , rotate, turn, and zoom in on the TINs in your 3D Scene.

  • To rotate and flip the TIN, make sure the Navigate tool is active. Click and hold inside the 3D scene and move your cursor around.
  • To zoom in and out, make sure the Navigate tool is active, hold down the right mouse button and drag the cursor down to zoom in or drag it up to zoom out.
  • To Pan around your 3D scene, hold down the middle wheel button and drag the cursor around the scene.

Extruding features

Sometimes, seeing features from a 3D perspective is difficult if there isn’t a great deal of difference in elevation between each of the features. In order to make this difference more apparent, 3D Analyst allows you to do what is called Vertical Exaggeration on all the layers in the 3D Scene. This vertical exaggeration factor is consistent for all the layers and their features inside the scene.

In the ArcScene View menu, select Scene Properties. Click the General tab. Click the Vertical Exaggeration dropdown arrow and change the Vertical exaggeration factor to 2. Click OK.

See the difference it made.


Adjust TIN's symbology

Return to ArcMap. Turn all your layers off except after_tin

Open the Symbology properties for after_tin. Note there are two different feature types listed (Edge types and Elevation). With the Edge types features selected (note the difference between selected and checked!), click Add All Values. TIN triangles are composed of a number of different edge types. Adding all values will show all the edge types for the TIN. You may choose any color scheme you like, click Apply to re-set the symbology.

Now you see all the different edge types. Note that in some places the triangles are very small, whereas in other places the triangles are very large. Where the
surface is more convoluted there are more and smaller triangles, but where the surface is more simple, it can be represented with fewer large triangles.

To remove those Regular Edges, which seem to make your TIN look busy, right-click the symbol and choose Romove Values. You may do the same to remove values for Outside Edges.

Select Elevation. Uncheck the Show hillshade checkbox. Click Apply.

Now you can see that it is difficult to determine the form without artificial hillshading.

Recheck the Show hillshade checkbox to see the landform. Shading makes a big difference in the appearance of surface models. It is what allows the eye to interpret a surface as a 3-dimensional.

Make sure Symbology properties still open and click the Add button. There are several additional choices for how to render the 3D TIN data.

Select Face aspect with graduated color ramp. Click Add, then Dismiss to close the dialog window.

Aspect, or slope direction, is the compass bearing for each triangle face. Imagine if you dropped a bowling ball on a triangle edge and measured the compass angle of the ball's trajectory; this is the aspect value.

Back to Layer Properties dialog, click Apply and then you will see the Aspect shown on the screen.

Add another renderer. This time select Node elevation with graduated color ramp

Click Dismiss, back to Properties dialog, uncheck Aspect and click Apply.

You can now see the individual vertices (nodes) that define each triangle.


Find steepest descent path

The steepest descent path shows the direction water will flow from a user-selected location in a raster grid until slope levels off.

Turn all the layers off except before_tin.

Add the Draw toolbar by going to the Customize menu, then select Toolbars, and finally clicking beside Draw.

From the Drawing menu on the Draw toolbar select Default Symbol Properties. We are going to change the default line symbol to make the default line symbol a thick pink line (in order to see descent pathways better). All lines added later will use this symbol.

Click the line symbol. Select a pink color and alter the thickness to 2 pixels. Click OK.

Make sure the Layer selected in the 3D Analyst toolbar is before_tin. Click the Steepest Path tool

Click anywhere near the top of the mountain. Notice that the lines are added as simple graphics rather than as feature layers. However, the lines can be converted to features later. These simple graphics also contain 3D information (Z value on the vertices).

Go ahead to create a few more steepest pathes. From the Edit menu, choose Select All Elements to select all pathes. All the line graphics should now be selected.

To create a new data set from the graphics, from the Drawing menu in the Draw toolbar, select Convert Graphics to Features, creating the shapefile, name it steepest.shp. You can add the data layer to your map.

Delete all the line graphics from the data frame (Edit > Select All Elements then Edit > Delete).

Similar analyses can be used to determine lowest-cost pathways for surfaces that represent features other than elevation.

Can you think of some applications where you think this tool would be useful?


Area and volume calculations

3D Analyst allows us to calculate the area and volume of a raster grid or a TIN data source.

From ArcToolbox, double-click 3D Analyst Tools, and then Functional Surface, then double-click Surface Volume.

Select hbefore as the Input Surface, You want to set the Reference Plane to be ABOVE the plane. Name your Output Text File areavo_bef, make sure save it in your folder. Leave the plane height value empty. Click OK.

The text file will be added into the table of contents after the process is done. Open it by right-click the file, then select Open.

You will find three numbers: Area-2D, Area-3D, and Volume.

Area-3D is measured along the slope of a surface, taking height into consideration. It is considered to be the "true" surface area, while Area-2D is the 2D planimetric extent of the model (a parallel projection to a flat plane). Think of a pyramid. Looked at from directly above, it appears to be a square (Area-2D), this is less than the surface area of the pyramid (Area-3D).

Now make the hafter layer selected and follow the steps to calculate the area and volume statistics for this layer.

Write down all the values for both two layers, What differences are there? What can you say about the change in area/volume after the explosion?


Cut and fill analysis

Cut-fill analysis determines how much material is lost or gained in an area by comparing two surface models of it; one before a change and one after.

Return to ArcScene add both hbefore and hafter to your scene.

Open ArcToobox by clicking on the icon . Then double-click the 3D Analyst Tools and then double-click Raster Surface then Cut Fill.

Choose hbefore as the “before surface” and the hafter as the “after surface”. Name the output raster cut_fill, make sure save it in your folder. Leave Z factor as shown. Click OK.

ArcScene will do some calculations, You will then have a new layer added to your Table of Contents.

Turn on the visibility for this new layer and turn off the visibility for the other layers. You will notice that the new TIN is just a flat surface. The reason is that it doesn’t know from which surface it should take its base heights.

This is not the same as extruding features! Base heights are a set of reference heights for a layer. They are defined by an expression (mathematical equation), a surface, or in the case of 3D feature layers, the 3D shapes themselves. All layer types require that base heights be defined.

Make the new cut_fill layer the active layer. Right click on the layer and select Properties. Click the Base Heights tab. Select Floating on a custom surface, Click the Browse Folder icon and choose the hafter layer. Click OK.

Use the Navigate tool to zoom in and out of the cut fill layer and to move it around.

What are you looking at here? What do the blue areas represent? What do the red areas represent?

Save your scene, and close ArcScene now.


Analyzing visibility

The line of sight tool allows you to analyze what parts of the landscape are visible along a line of sight between an observer and a target. It allows you to determine if an object or part of the landscape that is between an observer and target can be seen.

Return to ArcMap, add the following layer to your map:

observation.shp

Change the symbol for this layer to a triangle.

Turn on only after_tin and newly added observation.shp layer.

In the 3D Analyst toolbar, select the Create Line of Sight tool

In the dialog box, change the observer offset to 3 and leave the target offset at zero. Close the box.

Now, your cursor will turn into crosshairs. Click and hold the crosshairs on the observation point (observation.shp) drag a line to the location of the target that you wish to observe, let’s say, the peak of the mountain, then release your mouse button. A new line will appear.

The red portion(s) of the line indicates that you will not be able to see those areas from the observation, the green lines means that you will.

You can also create a surface profile, make sure the line of sight is still selected (if not use the Select Elements tool to select it. Then click the small dropdown icon next to Point Profil tool and choose Profile Graph

A profile graph will be created.

Can you think of some real world applications where you think this technology would be useful?

Delete the line of sight from the map (Edit > Select All Elements then Edit > Delete).


Create a viewshed

Viewshed refers to the areas on a surface visible from one or more observation points. For any visible position, you also discover how many observers can see that position. These kinds of analyses are used in any kind of research or planning where knowing the areas visible from a single location is important.

Still in ArcMap, with both layers still visible, Open ArcToobox by clicking on the icon . Then double-click the 3D Analyst Tools and then double-click Raster Surface then Viewshed.

Set the Input raster to hafter and the Input Observer Points to observation. Name the output raster viewshed_af, make sure save it in your folder. Leave Z factor as shown. Click OK. A new grid layer will be created

Turn off all layers but observation and the newly added viewshed grid, In this raster grid, the red areas are not visible from the observation point and the green areas are.

Convert the grid to a polygon layer (ArcToolbox > Conversion Tools > From Raster > Raster to Polygon)

Select Input raster to viewshed_af, make sure VALUE is selected for Field. Name your output polygon features viewshed.shp. Click OK.

Change the symbology of the viewshed.shp layer to show only those polygons with a GRIDCODE = 1 (visible), and use a line fill symbol so you can see underlying data (you can remove the symbol of 0 (Not Visible) from the list and the symbol color of <all other values> should be no fill color).

Double-click viewshed.shp then click Symbology, choose Categories, then Unique values. In the Value Field, choose GRIDCODE. Click Add All Values, then Right-click the symbol next to Value 0, then choose Remove Value(s). Uncheck <all other values>.

Double-click the symbol next to Value 1, choose the symbol with 10% Simple Hatch. change Fill color to green and Outline Width to 1. then Click OK,

Turn on only hilshad_af layer (created earlier) and viewshed.shp layer, now you can interpret the landform and visibility with the help from Hillshade tool and Viewshed tool.

What kind of applications would make good use of a viewshed analysis?

It is time to save your map and close ArcMap.


Display features in 3D

Open ArcScene again, from Catalog, add the following three layers into the scene:

tracts.shp (polygons for all census tracts in Travis County)
tracts_pt.shp (the centroids for census tract polygons)
tracts_pt.shp (the centroids for census tract polygons) YES! add the same layer TWICE!!!!

Move the tracts.shp layer to the bottom in the table of contents. Now all three layers are just flat in the scene.

Neither three layers contain any census information. Now let us first join a table containing population data into both layers. Right-click tracts_pt.shp, then Joins and Relates, then click Join...

In the dialog it appears, set it as below. For the outside table, you need to click the Browse Folder icon and then navigate to the folder ex4 and look for an Excel file named "census.xls", choose Sheet0$.

Click OK, then the census data is now joined into the layer. Repeat the process for layer tracts.shp and the other tracts_pt.shp

We are going to change the base heights of the first tracts_pt layer so that those points will be "floating" by the value equal to population (in fact, it is population/100000, because the units now are feet, we have to divide the population by that number in order to properly display population over the census tracts layer).

Double-click the first tracts_pt layer, in the Layer Properties dialog, click Base Heights tab, In the dialog it appears, Click Use a constant value of expression: Then click the calculator icon, in the next dialog, click Sheet0$.P001001 (this is the field for all population data), then choose / as the operator, then add 100000. Click OK. Back to Properties dialog, click Apply, then OK to close the dialog.

Now you can see those points are now floating over the tracts layer.

Next, change the second tracts_pt layer display properties so that the points will be extruded by the value equal to population/100000. The two tracts_pt layers will create a composite 3D view (one layer as "poles" and the other layer as knobs at the ends of the poles).

Double-click the second tracts_pt layer, in the Layer Properties dialog, click Extrusion tab, In the dialog it appears check Extrude features in layer, then click the calculator icon, once again, set the expression as [Sheet0$.P001001] / 100000. Click Apply then OK.

Now you can see the composite 3D view (one layer as "poles" and the other layer as knobs at the ends of the poles).

You can further play with Symbology for all three layers to change how the 3D is displayed on the scene. For example, you can change Symbology for the first tracts_pt layer as shown below:

Then change the symbol color for the second tracts_pt layer to a light gray.

Your scene now looks like this:

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?


The deliverable:

No assignment is due.


prepared by Ming-Chun Lee, 10/10/2014