Terrain Modeling and Analysis Objective: Prior to the advent of computer mapping and GIS, contour lines were used almost exclusively to represent elevation. The ability to fully visualize the landscape based on contours required considerable familiarity and experience that were beyond most everyone save for those who worked with topographic maps on a regular basis. Moreover, deriving even the most direct information from contours – ground slope or aspect, for example – was tedious at best. Geographic information systems provide a variety of ways to visualize the landscape more effectively than conventional contour lines, and they offer a rich variety tools for terrain analysis. In this exercise, ArcGIS® is used to explore: 1) techniques for deriving terrain models from elevation data; 2) different approaches to representing and visualizing terrain; and 3) tools for analysis of terrain features. Although the problem presented here involves elevation data, the principles and procedures can be applied to any conceptual threedimensional surface from atmospheric pressure to migration potential. The Problem: When Stowe decided to implement night skiing, one of the major obstacles that had to be overcome was concerns from the local citizenry about visibility of the lights. This exercise poses a hypothetical situation in which Sugarbush South also has proposed to offer night skiing on select trails. The objective is to determine the extent of the area that would be affected by lighting and to illustrate that area effectively on maps and terrain models. Elevation Models: All representations of terrain are derived ultimately from a series of control points for which are known geographical location (X and Y) and elevation (Z). Conventional topographic maps are constructed by interpolating isolines – hypothetical lines of equal elevation – from this series of control points. Isolines that represent elevation are known more specifically as contour lines. While geographic information systems certainly have the ability to interpolate discrete contour lines, they also accommodate representations of terrain that are effectively continuous. Like contours, however, these continuous models also are derived from a series of discrete control points. Although there are a number of different methods for constructing elevation surfaces from X-Y-Z points, most elevation models are constructed using either of two particular techniques: inverse distance weighting (IDW) and triangulated irregular network (TIN). The IDW (inverse distance weighting) method produces a grid or raster elevation model in which the value of each grid cell or pixel is an elevation. In constructing this raster model, a grid is superimposed over the control points, and then the elevation of each grid cell or pixel is interpolated in turn based on the nearest N control points. In some software, the user specifies the number of control points (N) to be used in the interpolation, while in other packages, the number of points is deter- Terrain Modeling and Analysis Page 2 mined internally. In either case, control points closer to the grid cell or pixel in question have greater weight in effecting the value of that pixel, while more distant control points have less weight. Specifically the IDW algorithm is: where: E is the elevation of the pixel in question; ei is the elevation of the i th control point; di is the Euclidean distance from the pixel in question to control point i; N is the number of control points; and b is a weighting exponent that controls the effect of distance. Values of b are usually set between 1 and 2. When b=1, the effect of distance decreases linearly, whereas for b=2, the effect diminishes as the square of distance. Most simply, as values of the exponent b increase, proportionally greater weight is given to closer control points. The IDW (inverse distance weighting) method is especially appropriate when control points are more or less uniformly distributed across the area, but when the points are irregularly spaced, the TIN (triangulated irregular network) may produce a more accurate model. As the name implies, a TIN (triangulated irregular network) is constructed by using the control points to construct a set of continuously connected triangles as illustrated at left below. Because the slope and aspect of any triangular facet can be calculated from the control points that define the triangle, each triangle can be conceptualized as a three-dimensional object as suggested by Lancôme’s imaginative advertisement. Known as Delauney Triangulation, the most common algorithm for determining how to build triangles searches for the three contiguous points that fit within the smallest radius. IDW and TIN models for the Sugarbush South study area can be compared visually in ArcMap™. After launching the program, click on the Add Data button. When the dialog opens, click on the Connect to Folder button at top, as shown below, and connect to K:/short_course/Friday_morning/data2. (Note that this is an alternative to connecting to a folder in ArcCatalog™.) When the folder opens, select DEM and then, holding the CTRL key down, select TIN, and both will be Terrain Modeling and Analysis Page 3 added to the map composition. As the names imply, DEM is a digital elevation model in raster format that was derived by the IDW technique, while TIN is a triangulated irregular network. Although the DEM will display in shades of gray, this can be changed easily by right-clicking on the layer name and selecting Properties from the menu that appears. Then from the Layer Properties menu, select the Symbology tab, and choose a new color ramp. Elevation models are often displayed with a so-called spectral ramp that ranges from red or orange for high values through blues for low elevations, but some monochromatic color ramps – ramps comprised of different shades of a single hue or color – also can be effective. If the triangular structure of the TIN is not apparent as it is constructed on the screen, use the Zoom tool to magnify a small area where there is relatively high contrast. Like the DEM, the display properties of the TIN may be changed by rightclicking on the layer name, choosing Properties from the pop-up menu, and then selecting the Symbology tab. Note that, by default, TINs are displayed with a hillshade illumination effect, but this can be turned off by clicking on the checkbox that appears in the lower left-hand corner of the Symbology tab. Display and Analysis: Nearly all of the display and analytical functions for working with terrain models are contained in an add-on module, or what is known in ArcGIS® as an extension. To enable this extension, click on the Tools in the menu bar at the top of ArcMap™. From the Tools menu, select Extensions, and then click the checkbox for Spatial Analyst. After the extension is turned on, right-click anywhere in the unused gray area to the right of the menus at the top of the ArcMap™ display, and click on Spatial Analyst to display the toolbar. Alternatively, click on View in the menu bar, select Toolbars from the drop-down menu, and click on Spatial Analyst. The Spatial Analyst extension includes a wide variety of tools for working with raster layers or grids, but this exercise is concerned largely with tools for Surface Analysis. To display these tools, click on the black triangle that appears immediately to the right of the words “Spatial Analyst” in the toolbar. In the drop-down menu that appears, click on the triangle to the right of Surface Analysis. Note that the list includes tools for deriving contours, slope and aspect grids, and a hillshade model, as well as analytical modules for visibility analysis and cut-and-fill volumes. To see how these tools work in general, click on Contour. In the Contour dialog, as shown at right, click on the triangle to the right of the Input Surface window, and note that the drop-down menu displays all grids or rasters in the active map composition. (If the 3D Analyst extension is turned on, the TIN also Terrain Modeling and Analysis Page 4 will be displayed, but because any analysis of TINs requires 3D Analyst, a TIN can be selected only if this extension is active.) Please select DEM, and set the contour interval to 30. Because the interval is implicitly specified in the same units of elevation that are represented in source model – DEM in this instance – contours will be calculated in meters. More specifically, for this example contours will be derived at intervals of 30 meters (98.43 feet) beginning with the value specified for Base Contour. Because elevation is nearly always given relative to mean sea level, the Base Contour should be set to zero. The Z Factor always should be one unless elevation values are in a different metric than the coordinate system for the grid or the TIN. If the coordinate structure of an elevation model, for example, was in UTM meters but elevations were specified in feet, then the Z Factor should be adjusted accordingly. Lastly, be careful that location for the shape file that will contain the contours is specified appropriately. Here, please name the shape file CONTOURS, and place the file in the folder with the other data for this exercise. The symbology for contours, which are vector lines, can be changed by rightclicking on the layer name and selecting Properties from the menu. As with any shape file, the Symbology tab can be used to change the line symbol, the color, and the line weight of the contours, and the Labels tab can be used to label the contours with their corresponding elevations. Contour elevations are always stored in the feature attribute table for the shapefile under the item named CONTOUR. To further explore alternative representations of terrain, click on the triangle to the right of the words Spatial Analyst in the Spatial Analyst toolbar. Select Surface Analysis in the drop-down menu; choose Hillshade in the fly-out; and then in the Hillshade dialog, specify DEM as the source image. Azimuth refers to the compass direction in degrees of an imaginary light source used to illuminate the terrain and create the effect of shaded relief. Although with minor exception in the northern hemisphere, the sun would not shine from 315 degrees – the default value – the azimuth should always be set so that “shadows” created by the imaginary light source are toward the bottom of the image; otherwise, the topography will appear inverted. Altitude refers to the angle of the light source above the horizon. Lower angles give deeper “shadows” and a generally darker image. Accept the default value of the Azimuth, but change the Altitude to 30 degrees. Also check the box to Model Shadows. Finally, note that by default only a temporary hillshade is created. To save the image permanently, use the browse button to the right of the Output Raster window to indicate where the image should be saved and to name the hillshade appropriately. To create an even more depictive model of the terrain, drag the newly created hillshade below the DEM in the ArcMap™ table of contents. Next, right click on the name DEM in the table of contents, and select Properties from the menu that appears. Terrain Modeling and Analysis Page 5 When the Layer Properties dialog opens, select the Display tab, and change the Transparency from zero to 50 percent so that the shaded relief image can be seen through the DEM. While this display of hillshading beneath the transparent digital elevation model gives a visually effective representation of the terrain, please note that the Transparency for any layer can be changed under the Display tab. Viewshed and Visibility Analysis: Viewshed analysis constructs a raster image to show what is and is not visible from a specified point or a set of points. Because viewshed analysis is based on line of sight, the reciprocal also holds. That is, if a location is visible from a particular point, it follows that the point is visible from that location. The objective of this exercise is to determine the area which would be illuminated if night lighting was installed at Sugarbush South. If the locations of the lights themselves are used as the points for the analysis, then the result will show what is visible from that set of points or, in other words, the areas that will be illuminated by direct light. (Ambient light is not accounted for in this analysis.) To keep computer processing time reasonable, the analysis will be limited to two trails shown on the map at right: Morning Star and Hot Shot. Because these trails are under lift lines, lights can be mounted on the lift towers. Viewshed analysis requires that the viewpoints – lights, in this case – be in a separate shapefile. The heights of individual lights above the ground are specified in the attribute table for this shapefile under the item OFFSETA. While the height of each light or viewpoint can vary, for simplicity the height of all lights in this example is set to 10 meters. The first step in the analysis is to use the Select Features tool from the toolbar as shown at right to select those towers on which lights will be mounted and create a new shapefile to contain these features. With the Select Features tool, a box or marquis may be dragged around the desired features, or an individual feature can be selected by clicking directly on that feature. Features can be added to the selection set by holding the Shift key while additional selections are made. When relevant towers have been selected, each should be highlighted by a light blue dot as shown below at left. Terrain Modeling and Analysis Page 6 To save the selected towers in a separate shapefile, right-click on the layer Towers in the table of contents, select Data from the menu that appears, and then choose Export from the fly-out menu. Be certain to save the new shapefile in the directory for this exercise, and when prompted, add this shapefile to the current map composition. The Viewshed analysis can now be performed by selecting Surface Analysis from the Spatial Analyst drop-down menu and then choosing Viewshed in the fly-out menu. As shown here, the Input Surface is DEM, the digital elevation model, and the Observer Points are contained in the new shapefile that was created from Towers and is called Lights in this example. Again here, please note that the output will be written to a temporary file unless a permanent location is specified explicitly. Please save the Output Raster, that is the result of the viewshed analysis, in the folder for this exercise. As noted earlier, Viewshed creates a grid or a raster image. Although this new grid is displayed as a binary image in two colors – pink for not visible, and green for visible – each cell or pixel in this grid actually has a value of either zero, which means the cell is not visible from any of the points, or a positive integer, the value of which indicates from how many points that particular pixel or grid cell is visible. If a grid cell has a value of 3, for example, that particular cell is visible from 3 different viewpoints. In the particular case at hand, three lights would be directly visible from that grid cell. In the default display, all pixels with non-zero values are displayed in green, which in context of this analysis, means that all these pixels will be illuminated by one or more lights. Three-Dimensional Visualization: The ArcGIS® extension 3D Analyst facilitates the construction of apparent threedimensional surface representation. To invoke this extension, click on Tools from the menu bar, and then choose Extensions in the drop-down. When the Extensions menu appears, click on 3D Analyst. To add the 3D Analyst toolbar, right-click anywhere in the blank gray area to the right of the tool bars that already are displayed, and select the 3D Analyst toolbar. Alternatively, click on View in the main menu, select Toolbars from the drop-down, and choose 3D Analyst from the fly-out to the side. Terrain Modeling and Analysis Page 7 Although 3D Analyst includes a set of tools for working with grids and TINs, the visualization capabilities require the creation of an ArcScene™. This is a separate window that appears very much like ArcMap™ with a table of contents to the left and a graphics panel to the right. The difference, of course, is that ArcScene™ displays apparent three-dimensional representations rather than conventional map or plan views. To create an ArcScene™, click on the last tool on the 3D Analyst toolbar as shown above. Layers are added to ArcScene™ exactly the same way they are added to a map composition, by clicking on the Add Data button or by selecting Add Data from the drop-down menu after clicking File on the menu at the top of the page. For this exercise, begin by adding ORTHO_EAST.SID and ORTHO_WEST.SID, the orthophotos for the study area. To render these orthophotos in three-dimensions, right-click on the layer name ORTHO_EAST.SID, and select Properties. When the properties dialog opens, click on the Base Heights tab. In the dialog, choose the second option, Obtain Heights for Layer from Surface, and use the browse button at right to select DEM, the digital elevation model. (Please note that DEM does not have to appear in the ArcScene™ table of contents to use it for setting base heights in the display.) Click OK, and repeat this process for the other orthophoto, ORTHO_WEST.SID. Both photos should appear as a contiguous surface rendered in three dimensions. To make the view a bit more dramatic, select View from the menu bar, and then click on Scene Properties at the very bottom of the drop-down menu. Under the General tab in the Scene Properties menu, change the vertical exaggeration from one to 2 or 3. Please note that in most instances, some vertical exaggeration – typically a factor of 2 to 5 – is necessary to make the three-dimensional representation look realistic. Terrain Modeling and Analysis Page 8 Also note that the background color may be changed in the Scene Properties dialog. For the present scene, try changing the background to a very pale blue, and then change the color ramp for each of the orthophotos from gray to monochromatic green. (Remember that the symbology for any layer can be changed by right-clicking on the layer name, selecting Properties from the pop-up menu, and then choosing the Symboloby tab.) Finally, note that in the Scene Properties menu, which is opened by clicking on View in the menu bar, there is an Illumination tab that allows the direction and altitude of the hypothetical light source to be modified. Navigating: The first button to the right of the Help button on the ArcScene™ menu bar is the Navigate tool. After clicking on this button once, the image may be moved in three-dimensions by holding down the left mouse button and dragging. Holding the right button down while pulling the mouse toward you will zoom in, effectively in real time, while holding the right button down and pushing away will zoom out. Creating a Panorama: ArcScene™ accommodates the construction of a panorama as if a viewer were standing on a hilltop, for example, peering into the distance. To create a panorama, click the Center on Target button. Then on the image, click on the target: the point at which or toward which the hypothetical observer is looking. Next click the Set Observer button. Now, on the image, click the observer position: the location from which the observer is viewing the landscape. The image then will be adjusted automatically to construct the specified panorama. This process can be repeated from any perspective, but clicking on the globe button returns the default view at any time. Draping Layers: In principle, additional raster layers and some types of vector layers can be draped on top of an existing 3-dimensional representation. As an example, use the Add Data button to add the contours that were created earlier in this exercise to the ArcScene™. Now select the Properties menu for the contours by right-clicking on the layer name. Then click on the Base Heights tab, select Obtain Heights for Layer from Surface, and choose the DEM layer using the browse button. Click OK, and te contours should appear on the orthophotos. The contour symbololgy, of course, can be changed as appropriate. Other vector point and line layers may be draped in the same fashion. A vector polygon layer, however, will not drape properly, but it can be converted to a raster layer and then added to ArcScene™. Flying: ArcScene™ includes a tool that facilitates a dynamic fly-through. To invoke this capability, click on the fly button, as shown at right. Then click on the im- Terrain Modeling and Analysis Page 9 age and “fly” using the mouse to control direction, elevation, and velocity. Each click of the left-hand mouse button increases the velocity and decreases flight altitude, while a click on the right-hand button decreases velocity and increases altitude. The flight can be stopped at any time by clicking the Escape (Esc) key on the keyboard, and the globe button always returns the default view. Saving an ArcScene™: A representation or model created in ArcScene™ can be saved as a separate entity called an ArcScene™ document or an sxd file. While an .sxd file is more or less equivalent to an ArcMap™ composition, or .mxd file, .sxd files cannot be added to or displayed in an ArcMap™ map composition. To save an image created in ArcScene™ so that it can be displayed in a map composition, click on File in the ArcScene™ menu, and then select Export Scene in the drop-down menu. Although it may seem counterintuitive, select 2D in the fly-out menu. In the Scene Export dialog that opens, please note that the image can be saved in a variety of proprietary graphics formats. In addition, the resolution of the output image can be specified by clicking the Options button at lower right. A scene saved in one of these conventional graphics formats can be added to an ArcMap™ Composition by inserting the file as an object.