Exercise 8: Creating and using a terrain dataset

Complexity: Intermediate Data Requirement: Installed with software Data Path: See Copying the tutorial data Goal: Use lidar data to construct a terrain dataset

A terrain dataset is a multiresolution TIN-based surface derived from measurements stored in one or more feature classes in a geodatabase.

In this exercise, you will use geoprocessing tools to load surface data into a geodatabase, construct a terrain dataset, and use the terrain inside ArcMap and ArcGlobe.

Loading surface feature data into a geodatabase

In this scenario, you have lidar points and photogrammetric breaklines stored in two separate ASCII text files. This data will be used to construct your terrain dataset. To accomplish this, you need to import them into feature classes that reside in a feature dataset. The terrain will be generated in the same location as the source data.

You've been provided with a file geodatabase with a feature dataset. It contains two polygon feature classes: one is for lakes, the other to delineate the study area. The initial step will be to import the two ASCII files into the feature dataset as feature classes: one feature class will delineate the photogrammetric breaklines, while the other feature class will contain the lidar points.

Steps:
  1. Start ArcCatalog by clicking Start > All Programs > ArcGIS > ArcCatalog 10.
  2. Start ArcCatalog.
  3. Click Customize > Extensions.

    The Extensions dialog box opens.

  4. Verify the 3D Analyst option is enabled. If it's not, check it and close the dialog box.
    Enable the extension by checking the box.
  5. In the Catalog Tree, navigate to the Exercise8 folder and double-click terrain.gdb to open the geodatabase.
  6. Double-click the topography feature dataset.
  7. Expand the contents of the Exercise8 geodatabase and feature dataset.
  8. In the Catalog Tree, navigate to the 3D Analyst toolbox by expanding Toolboxes > System Toolboxes > 3D Analyst Tools.
  9. To expand a toolboxes means clicking the plus sign next to the name. It will expand to view the toolbox's contents.
  10. Expand the Conversion toolset, then From File tools, then double-click the ASCII 3D to Feature Class tool.
  11. The ASCII 3D to feature class geoprocessing tool dialog box opens.
    Double-click a geoprocessing tool to open it.

    Next, you'll convert the ASCII points from a simple text file in XYZ format into a multipoint feature class. These points only define surface geometry, and the attributes only contain x-, y-, and z-values. A multipoint feature class stores one point per line, and the coordinates are separated by spaces. Since there is no attribution associated with these points, dedicating a database row for each is wasteful and inefficient. Instead, you'll combine them into multipoints. A multipoint can store many points per shape or row, saving storage space and improving read-write performance.

  12. In the ASCII 3D to Feature Class tool, make sure the Browse for drop-down list is set to Files.
  13. Click the Browse Browse button next to the Input field, navigate to the Exercise8 folder, and choose the masspoints.xyz file as input.
  14. Define the parameters for the ASCII 3D to Feature Class conversion.
  15. Make sure Input File Format is set to XYZ.
  16. Click the Browse Browse button for the Output Feature Class and navigate to the topography feature dataset.
  17. Name the output feature class topo_mass_points and save it inside the topography feature dataset.
  18. If it is not done already, set the Output Feature Class Type to MULTIPOINT.
  19. Type inside the text box for Average Point Spacing and set the value to 10.
  20. The point spacing represents the average distance between measurement points. Sometimes this is referred to as nominal point spacing. This is given in the x,y units of the data.
    The average point spacing option is only available when the Output Feature Class Type parameter is set to MULTIPOINT. It facilitates the clustering of points so that each output multipoint is made from points that are relatively close to one another.
  21. Accept all other defaults and click OK to execute the geoprocessing tool.
  22. In the next step, you'll use the same ASCII 3D to Feature Class tool to import the ASCII breakline data.
    Breaklines are linear features, such as roads and water body shorelines, that need to be represented on the surface. The breaklines are provided in the 3-D GENERATE format—an ASCII format similar to XYZ but more appropriate for line and polygon data.
    You can find a detailed description of the GENERATE format in the desktop help. To find it, click the Learn more about link located at the top of the help page for the ASCII 3D to Feature Class tool.
  23. Double-click ASCII 3D to Feature Class to open the geoprocessing tool.
  24. Make sure the Browse for drop-down list is set to Files.
  25. Click the Browse Browse button and choose the breaklines.lin file as input.
  26. Set the Input File Format to GENERATE.
  27. Set the ASCII 3D to Feature class parameters for breaklines.
  28. Click the Browse Browse button for the Output Feature Class and browse to the topography feature dataset. Name the output feature class topo_break_lines.
  29. Set the Output Feature Class Type to POLYLINE.
  30. Click OK to execute the geoprocessing tool.
  31. You will now preview to confirm that the breaklines have been created correctly.
  32. Click to select the topo_break_lines feature class in the catalog tree.
  33. Click the Preview tab to view the breakline data.
  34. Preview in ArcCatalog
  35. Make sure the Preview type is set to Geography. The preview should resemble the breakline data displayed in the above image.

Now you've loaded the mass points and breaklines from which a terrain dataset will be built. The lidar points came in XYZ format and the photogrammetric lines in 3-D GENERATE format. Both are ASCII formats for simple 3D data and are read using the same tool, ASCII 3D to Feature Class.

NoteNote:
  • If you need to process a large collection of lidar points, consider using the LAS format instead of XYZ. LAS is an industry-standard format for lidar data. It's more efficient because it's binary. It also has more information stored in the file about the data.
  • There's a separate tool to import LAS format files, LAS to Multipoint, that's located in the same toolset as the ASCII 3D to Feature Class tool.

Building a terrain dataset from features

Next, you will use the New Terrain wizard in ArcCatalog to define and build a terrain dataset.

Steps:
  1. In ArcCatalog, right-click the topography feature dataset, point to New, and select Terrain from the context menu.
  2. Build a new terrain dataset using the New Terrain wizard.
    Terrains are located in feature datasets. Terrains, and the feature classes used to build them, must reside at the same location. One benefit of using the feature dataset as a container is that it ensures that all the data used to build a terrain has the same spatial reference. In an SDE database, it's also the organizational level at which data gets registered as versioned for editing.
  3. In the New Terrain dialog box, accept the default name for the terrain dataset.
  4. Click Select All to check all the feature classes that are in the feature dataset.
  5. Set the new terrain dataset's characteristics.
  6. Set the Approximate point spacing to 10.
  7. Click Next.
  8. You will next indicate how each feature class will contribute to the terrain.
  9. Click the Advanced button to expand the list of columns.
  10. Use the New Terrain wizard to set characteristics.
  11. Set the Surface Feature Type (SFType) to hard line for the topo_water_poly feature class.
  12. The features of the topo_water_poly feature class should be incorporated into the surface as hard lines.
    Cells can be expanded and interactive inside the Terrain wizard.

    Since the mass points and breaklines have z-values, which will be used to define the terrain surface, the height source for them is set to Shape. This means that z comes from the shape geometry.

    The topo_clip_poly feature class contains a 2D polygon. It defines the horizontal extent of the surface and minimizes interpolation artifacts around the surface perimeter.

    Clip polygons work best when they're smaller than the extent of the data that is being used to provide z-values. The water polygons are represented by 2D geometry but have the height attribute SPOT. Each polygon can have its own height, but that height is constant. For lakes, this is fine, since they're flat. With this data, there are no measurements inside the lake boundaries that contradict the lake SPOT values, so you can add the boundaries as breaklines; otherwise, they'd be added as replacement polygons to ensure that their areas get flattened.

    Everything but the breaklines are used for the terrain's overview representation. The overview is a generalized representation of the terrain, similar to a vector-based thumbnail. The breaklines are too detailed for the overview, but all the other information is needed to produce a reasonable looking overview.

  13. Click Next to determine the terrain pyramid type.

Defining the pyramid for the terrain dataset

Terrain pyramids are used to create multiresolution surfaces. They're similar to raster pyramids in concept (that is, coarser pyramids are used for display at smaller scales to improve display performance), but there are differences. The most significant are that they're composed of vector based measurements and they can be used for analysis as well as display.

Two types of pyramids can be used to build a terrain dataset: z-tolerance and window size.

Z-tolerance pyramiding thins points to produce surfaces that are within an approximate vertical accuracy relative to the full-resolution data.

The window size pyramid type thins points for each pyramid level by partitioning the data into equal areas (windows) and selecting just one or two points from each area as representatives. Selection is based on one of the following criteria: the minimum, maximum, mean, or both the minimum and maximum z-value.

Steps:
  1. Click the radio button next to the Z-tolerance pyramid type.
  2. Set the pyramid type.
    The z-tolerance pyramid type is defined using two factors: z-tolerance and reference scale.
    The z-tolerance of an individual pyramid level represents its approximate vertical accuracy relative to the full-resolution data. The reference scale of a pyramid level defines the display scale at which it becomes active.
  3. Click Next to define the terrain pyramid levels.
  4. Click Add four times. This populates the table for you to customize the properties.
  5. Manually reset the values for Z Tolerance and Maximum Scale by clicking the values inside each column. Use the values specified in the following graphic.
  6. Set the terrain pyramid levels.

    Using these settings, the full-resolution data is used in map displays up to a scale of 1:2,500. Between display scales of 1:2,500 and 1:10,000, only the data necessary to achieve an approximate vertical tolerance of 1.0, relative to the full-resolution data, is used. Between 1:10,000 and 1:25,000, a tolerance of 2.5 is used. Between 1:25,000 and 1:50,000, a tolerance of 5 is used. For any scale smaller than that, a tolerance of 10 is used.

    Tolerances and scales used to define a terrain pyramid need to be specified based on application requirements. One approach is to mimic the accuracy requirements of a contour map series. A generally accepted rule is that contours should be accurate to within one-half of their interval. For example, if a 1:24,000 scale map within your study area uses a 5-foot contour interval, then the vertical accuracy should be 2.5 units RMSE. Base the pyramid on the scales and contour intervals appropriate for a map series of the terrain.

    While breakline vertices are used where needed through all pyramid levels, the actual line enforcement can be restricted to occur in a subset of these levels. For example, road curbsides need not be enforced as triangle edges in a terrain at scales smaller than 1:24,000. You control enforcement via the Pyramid Bounds dialog box.

  7. Click the Resolution Bounds Setting button to open the Pyramid Resolution Bounds dialog box.
  8. Set the Max Z Tolerance for the topo_break_lines feature class to 1. Accept the defaults for all others.
  9. Pyramid Resolution Bounds dialog box
    In the Pyramid Resolution Bounds dialog box, z-tolerances indicate at which pyramid levels the enforcement is to take place. Using the given values, the breaklines will be enforced for pyramid levels with z-tolerances >= 0 and <= 1.0. This translates into the breaklines being enforced only at scales larger than 1:10,000. The water and clip polygons are enforced through all scales. This ensures the data boundary is always correct and water bodies remain flat.
  10. Click OK to dismiss the Pyramid Resolution Bounds dialog box.
  11. Click Next to reach the summary panel.
  12. Review your settings.
  13. Click Finish.
  14. Summary of the terrain settings before it is created
  15. You're now asked if you want to build the terrain. Click Yes to initiate the terrain build process.
  16. Create Terrain.
    When the terrain build process is complete, the new terrain is added to the Catalog Tree inside the feature dataset. Right-clicking the new terrain dataset will expose the properties. You can preview the terrain dataset in ArcCatalog.
    The new terrain is added to the feature dataset inside the geodatabase.

Viewing a terrain in ArcMap

Now that you have created a terrain dataset, adding it as a layer in ArcMap can be used to conduct further visualization and analysis. You can turn it on and off in the table of contents. As well, it has a Layer Properties dialog box to control display parameters. The layer properties Symbology tab is identical to TIN layers.

Steps:
  1. From ArcCatalog, click the Launch ArcMap Launch ArcMap button on the Standard toolbar to start the application.
  2. In the ArcMap - Getting Started dialog box, click Browse Browse and set the default geodatabase path to D:\3DAnalyst\3D_Default.gdb.
  3. This location will be used for output spatial data generated in the tutorial exercises.
  4. Click OK to close the Getting Started dialog box.
  5. Once ArcMap opens, you can close ArcCatalog.
  6. Click the Catalog tab to open the Catalog window, navigate to topography_Terrain from the Exercise8 folder, drag it into the map view, then release the mouse button.
  7. Use the Catalog window to drag and drop data into the map view.
    The terrain draws in the map view, and the topography layer is automatically added into the table of contents.
    The terrain layer displays in ArcMap.
    The terrain will retrieve measurements from the database for the pyramid level associated with the current display scale. The measurements are triangulated on the fly and drawn to the screen. When going from coarser pyramid levels to more detailed levels, only the additional measurements needed to get to the higher-detail pyramid level are retrieved and added to the triangulation.
  8. Zoom in Zoom In on the display.
  9. Zoom in to the highlighted area.
    Note how the vertical tolerance associated with the current display is listed in the map's table of contents.
    Vertical tolerance. These values are only needed at this level of display.
  10. Zoom to the full extent of the layer by clicking the Full Extent Full Extent button from the Tools toolbar.
  11. Note that Overview Terrain is listed in the table of contents.
    The terrain overview is the coarsest representation of the terrain. It's coarser than the lowest level of detail (LOD) pyramid specified when the terrain was defined.
    The overview is used by default when the layer is zoomed out to full extent or beyond. This is used to speed up rendering. Use of the overview representation can be turned on and off from the Display tab of the terrain's Layer Properties dialog box. You can also apply a point limit from this tab.
    The use of a point limit tells the terrain layer to further downgrade its display resolution if the current environment (that is, display extent, scale, and pyramid definition) would require too many measurement points. This helps maintain display performance at the cost of not always honoring the terrain's original pyramid display definition. When the resolution has been downgraded, an asterisk is displayed next to the terrain layer's name.
  12. Double-click the terrain layer to open the Layer Properties dialog box and click the Display tab.
  13. Change the point limit from 800000 to 125000 and click OK to close the Layer Properties dialog box.
  14. Change the overview terrain's point limit from the Display tab on the Layer Properties dialog box.
  15. From the map display, zoom in and out, then pan around.
  16. The display should be consistently fast, because the layer is adjusting which pyramid levels get used to keep the point count below the 125000 limit.

Using the interactive surface analysis tools in ArcMap

Now you'll use the 3D Interactive tools to complete some surface analysis.

Steps:
  1. Make sure the 3D Analyst extension is enabled in ArcMap by clicking Customize, then Extensions.
  2. Click Customize and Toolbars to add the 3D Analyst toolbar, if it is not already displayed. The terrain is displayed in the Layer list on the toolbar.
  3. The ArcMap 3D Analyst toolbar

    If you aren't zoomed in far enough, the tools on the toolbar are disabled. By default, they're only enabled when the terrain is displayed at full resolution. Based on how the terrain's pyramid was defined, this will occur at display scales of 1:2,500 or larger.

    You can enable the tools at lower resolutions from the Analysis tab of the terrain's Layer Properties dialog box. When you enable the tools at LODs lower than full resolution, the accuracy is also decreased. Interactive tools always operate at the current display resolution. This is useful if the full-resolution terrain is oversampled for the requirements of the analysis.

  4. Double-click the terrain layer to open the terrain Layer Properties dialog box and click the Analysis tab.
  5. Set the resolution threshold for the 3D Analyst tools to 1.000000 from the drop-down menu.
  6. Set the resolution threshold for when to display the 3D Analyst toolbar tools.
  7. Click OK.
  8. Zoom in Zoom In on the terrain until the display scale is larger than 1:10,000.
  9. Zoom in.
    The 3D Analyst interactive tools on the 3D Analyst toolbar should now be enabled.
    Now you'll conduct a line-of-sight analysis on the surface.
  10. Click the Create Line of Sight Create Line of Sight button.
  11. Set the Observer offset to 5 and the Target offset to 2.
  12. Observer and target offsets for the Line of Sight tool.
    The line of sight will be calculated to show what is visible from the perspective of an observer five meters tall to a target two meters high.
  13. Click on the south slope of the mountain in the upper-left part of the terrain (the observer point), drag the line to the lower-right part, then release the mouse button (the target point).
  14. Digitize the line-of-sight path starting from the observer location and finishing at the target location.
    The line of sight is calculated. The green segments show areas that are visible from the observer point; the red segments are hidden from the observer.
  15. Click the x in the upper right corner to close the Line of Sight dialog box and press DEL to delete the graphic from the view.
  16. Close the Line of Sight dialog box.
    Now you'll interpolate a 3D line on the surface.
  17. Click the Interpolate Line Interpolate Line button.
  18. Digitize the first point in the left center of the view, drag the line to the upper-right corner to create the second point, then drag toward to the lower-right corner. Double-click to create the last point and stop digitizing.
  19. The resulting graphic line will automatically be selected.
    A selected 3D polyline enables the Create Profile Graph tool.
    Digitize three points to enable the Create Profile Graph tool.
    A profile along a line with two segments is created.
  20. Click the Profile Graph Tool Create Profile Graph button to graph the 3D line.
  21. The profile graph is created.
    Create a profile of line segment over a terrain using the Interpolate Line and Profile Graph tools.
  22. Click the x in the upper right corner to close the Profile Graph Title dialog box and press DEL to delete the graphic from the view.

Rasterize a terrain using a geoprocessing tool

Terrain datasets can be rasterized based on any extent, cell size, and vertical tolerance. You can choose between linear and natural neighbor interpolators. A natural neighbor interpolation method generally produces higher-quality results but at the expense of processing time. Rasterization is performed using the Terrain to Raster geoprocessing tool.

Steps:
  1. From the Catalog window, expand Toolboxes, click System Toolboxes, then click the 3D Analyst Tools toolbox.
  2. Navigate to the Conversion toolset, then the From Terrain tools, and double-click the Terrain to Raster geoprocessing tool.
  3. Terrain to Raster
  4. Choose the topography_Terrain in the Input Terrain drop-down list.
  5. Set the other values to match the graphic below.
  6. Type CELLSIZE 10 in the Sampling Distance drop-down list.
    Parameters for the Terrain to Raster geoprocessing tool
  7. Click OK to execute the geoprocessing tool
  8. Keeping the Output Data Type as FLOAT will preserve vertical precision.
    Changing the interpolation Method to NATURAL_NEIGHBORS will take a little longer than LINEAR, but it adds some smoothness everywhere except across hard breaklines where sharp discontinuities are supposed to occur.
    Setting an explicit Sampling Distance lets you know exactly what the output cell size will be.
    Since this terrain dataset was made with a z-tolerance pyramid type, the pyramid resolution represents the z-tolerance of the desired pyramid level. In this terrain, the pyramid level with a resolution of 1.0 has the breaklines enabled.
    This surface will be somewhat generalized relative to the full-resolution data, but not by much, and this process will run faster because it's using a thinned version of the data.
  9. Click Full Extent Full Extent once the geoprocessing tool has completed to view the results. Turn off the topography_Terrain layers.
  10. Results of the rasterized terrain dataset

Generate a hillshade using a geoprocessing tool

To see the morphology of the derived raster surface, generate a hillshade image. A hillshade representation of a surface can greatly enhance the visualization of a surface for analysis or graphical display, especially when utilizing the transparency setting.

Steps:
  1. From the Catalog window, expand Toolboxes and click System Toolboxes, then click the 3D Analyst Tools toolbox.
  2. Navigate to the Raster Surface toolset and double-click the Hillshade tool.
  3. Hillshade geoprocessing tool
  4. Choose the terrain_grd in the Input raster drop-down list.
  5. Confirm that all other values match the graphic below.
  6. Parameters for the Hillshade geoprocessing tool
  7. Click OK to execute the tool and examine the resulting hillshade layer.
  8. Hillshade results are added to the map view.

Using a terrain as an elevation layer in ArcGlobe

Terrain datasets can be used in ArcGlobe as either elevation or draped layers, contributing to the definition of the globe surface.

Steps:
  1. From ArcMap, click the Launch ArcGlobe ArcGlobe button on the 3D Analyst toolbar to start the application.
  2. In the ArcGlobe - Getting Started window, make sure the default geodatabase path is set to D:\3DAnalyst\3D_Default.gdb.
  3. This location will be used for output spatial data generated in the tutorial exercises.
  4. Click OK to close the Getting Started dialog box.
  5. ArcGlobe starts.
  6. Close ArcMap. It is no longer needed for the rest of the exercise.
  7. From the Catalog window, navigate to topography_Terrain from the Exercise8 folder, drag it into the 3D view of ArcGlobe, then release the pointer.
  8. Add data to ArcGlobe using the Catalog window.
  9. If prompted, close the Geographic Coordinate Systems Warning message box.
  10. The data will be projected to the ArcGlobe program’s currently set Geographic Coordinate Systems.
    The Geographic Coordinate Systems Warning can be closed.
    The terrain dataset is automatically added as an elevation source in the table of contents of ArcGlobe. It will not be visible if it is used as an elevation surface to drape additional surfaces on.
  11. From the Catalog window, navigate to 3D_Default.gdb and click the geodatabase.
  12. In the panel underneath the Catalog's tree view, select the contents of the geodatabase by holding the SHIFT key. HillSha_terr1 and terrain_grd are selected.
  13. Drag both selected layers into the 3D view of ArcGlobe, then release the pointer.
  14. Drag the layers from the 3D Default geodatabase into the globe view.
  15. An Add Data Wizard dialog box appears for terrain_grd. Click Finish to use the rasterized terrain as an image source.
  16. ArcGlobe's Add Data Wizard
  17. A dialog box may appear requesting to build raster pyramids. Click Yes.
  18. Build Pyramids for improved display.
  19. An Add Data Wizard dialog box appears for HillSha_terr1. Click Finish to use hillshade raster as an image source.
  20. ArcGlobe's Add Data Wizard. Image layers will be draped on the globe surface. Elevation layers will not be visible in the view.
    If prompted, close the Geographic Coordinate Systems Warning message box.
    Close the Geographic Coordinate Systems Warning message box.
    The hillshade raster and rasterized terrain layers are automatically added into the table of contents as draped layers.
  21. Click and drag the Imagery layer until a black line appears after the hillshade indicating the new location. Release the mouse once this line appears.
  22. Move the Imagery layer below the raster images so it does not block them from displaying.
  23. Right-click the rasterized terrain and click Properties.
  24. Open the Layer Properties dialog box.
  25. Click the Symbology tab.
  26. Symbolize the rasterized terrain using an appropriate elevation color ramp.
    Symbolize the terrain.
  27. Click the Display tab.
  28. Assign a transparency setting of 50%.
  29. Set layer transparency.
  30. Click OK to close the Layer Properties dialog box.
  31. Zoom in to the rasterized terrain and navigate around.
  32. Zoom in closer to examine the rasterized terrain in ArcGlobe.
    The hillshade raster can be seen through the rasterized terrain using this transparency setting, revealing a 3D morphological surface of the terrain dataset.

Optimizing display settings in ArcGlobe

For high-quality display, you can do several things. Go to the Cache tab on the terrain's Layer Properties dialog box and uncheck the option to compress to 16 bits. This will eliminate the possibility of the surface geometry looking stair-stepped when zoomed in very close.

Double-click a layer to open the Layer Properties dialog box. Use the Cache tab to adjust raster data settings.

You can also set both the draped layers to use bilinear renderers. These will draw a smoother picture. Also, the hillshade raster should not use any stretch. The default, using standard deviations, is not appropriate for this data.

Display settings for rasters. Resample using Bilinear renderers.

As an alternative to viewing draped rasters derived from the terrain dataset, you can add the terrain directly as a draped layer.

To do this, right-click Globe layers from the table of contents, point to Add Data, click Add Draped Data, then choose the terrain.

Add the raster as a draped layer in ArcGlobe.

In this exercise, you have been introduced to terrain dataset concepts. You used geoprocessing tools to load lidar points and photogrammetric breaklines into feature classes residing in a feature dataset. Then, with the surface data in a feature dataset, you constructed a terrain dataset using the terrain wizard in ArcCatalog. You then conducted some analysis on the terrain surface inside ArcMap and ArcGlobe.


6/11/2012