[an error occurred while processing this directive]

Basic Terrain Modeling

Most of the work we do at the Graduate School of Design begins with a site. The existing terrain on the site provides us with opportunities and challenges in terms of how and where our various interventions will go. Sometimes our interventions may actually call for altering the site's terrain. This tutorial provides an easy way to model, manipulate and analyze terrain scenarios in digital form. These terrain models will provide a very flexible way of generating terrain models which will lay the groundwork for other site modeling enterprises.

We begin with familar forms of terrain representation that we have encountered on topographic maps -- contours, drainage lines and spot elevations. We represent these in a vector-GIS database that we can edit. We will then look at how a terrain modeling program can interpolate between these indicators of elevation and landform to create a Triangulated Irregular Network, or TIN. which models the entire surface.

When we understand the basics of how terrain is formed and modeled using breaklines and masspoints, we understand how to create terrain surfaces that are quite detailed where we need them to be, yet without the excess detail that is usually accompanied by terrain models created from contours alone. If you have ever worked with too-detailed terrain models in a 3D environment, you understand why an exessive amount of detail in your terrain can make a model very unwieldy to work with. Although the terrain surfaces that we create with these techniques are very efficient, they can be used to create contours with any interval for the purposes of graphic display or for laser cutting.

### The Sample Dataset

The sample dataset for this tutorial is gathered using the techniques described in Beginning a GIS Database, Georeferencing Images and The existing terrain condition for Fields Point was obtained using the techniques described in Gathering Digital Elevation Models. We also made use of batymetry information from www.narrbay.org.

Click here to download the sample data. (Northpoint Park) THis is a great model for studying some complex and functional terrain surfaces created with basic patterns of contours and breaklines. Especially open the files in gis/scheme1/docs.

Click here to download the sample data. (Chelsea) THis model uses the most recent approcah to the schema. CAD users will be particularly into the dwg version: see data/no_scheme0a/cad/scapematic.dwg. Tis cad file can be edited in AutoCAD or Rhino and still yield all the GIS surface creation and analysis tools!

 A familiar topographic map demonstrates a vocabulary of 2.5 dimensional symbols. Contours and Shorelines portray elevation of the land and ths direction and steepness of slopes. Drainage lines stipulate the places where slope breaks from up to down. Spot Elevations show places of measured height that fall between contours. These local indicators of elevation and slope behavior may be used to Interpolate edges of traingular faces to estimate the behavior of the landform between the symbols to define a surface that are three dimensional (click to view animation.)

Once we have a surface model, we can apply several analytical procedures that provide important information such as the volume of the surface, and the degree and orientation of the slopes. With all of this understanding, we will be ready to learn to edit the basic terrain elements and generate new terrain scenarios, which can then be individually analyzed and compared with eachother to understand specific amounts of earthwork needed, and the locations of cuts and fills.

 A familiar A terrain surface avails itself of many useful analyses: Steepness of slopes can be estimated for each face Aspect or the direction of the slope can also be estimated. Volume and Surface Area of the terrain model can be measured. With A Before Surface and an After Surface we can calculate the areas that will recieve Cut and Fill.

A note about software: there are various tools for terrain modeling. Some of them allow you to create terain from contours -- such as FormZ and 3d Studio MaX. The best terrain modeling tools tools permit you to control landform behavior more precisely with the addition of spot elevations and forced surface break-lines such as streams. Both ArcGIS -- with the 3-D Analyist Extension and AutoDesk's Land Development Desktop make use of this same vocabulary of terrain components. We chose to use ArcGIS here because it is much easier to set up and duplicate and edit terrain models in ArcGIS. The principles and the basic workflow demonstrated in this tutorial will be eaually applicable in any high-end terrain modeling tool.

## Download and Explore the Tutorial Dataset

Use the link at the top of the page to open the zip archive containing the tutrial dataset. Extract its contents into a folder named C:\temp\your_user_name. It is important that you extract this dataset to a file system path where no folder has spaces in its name or has more thanm 10 characters in its name, otherwise the models inside will have problems finding the files that they reference.

To begin with, lets take a look at the files that are part of the tutorial dataset using arccatalog. You will see two folders, one containing a scanned, georeferenced topo map from the US Geological survey. There is also a folder for user data. In the user folder you will find a subfolder named template which contains an arcmap document and personal geodatabse which, in turn contains several feature classes: contours, streams, masspoints and a clip layer. The contours in this database were created using trhe techniques described in Obtaining and transforming elevation data For details about how this geodatabase and its feature classes were created, see the following references:

### References:

The resources in the user/template folder form the basic starting-place for a terrain model of the existing condition of Fields Point, near Providence Rhode Island. Our workflow in this terrain modeling enterprise will be to make a copy of this template folder for each of the terrain scenarios we will create.

### Create a new Scenario and open it in ArcMap

1. Use AcrCatalog to make a copy of your template folder Chelsea studio: maka a copy of the no_scheme0_a folder. Name it scheme_a
2. Always keep these names shorter than 9 characters or else you will have problems.
3. Now open your new scenario folder and double-click on the arcmap file arcmap_1.mxd within your new scenario folder. (Chelsea studio: this file is in the docs folder, and it is named terrain_worksheet.)

### Explore the Basic Components and Procedures for Terrain Modeling

The map file you just opened contains several layers: the scanned USGS quad map and vector feature sets for contours and streams, spot elevations and boundary. SOme of these have an elevation attribute.

### Inspect the Attributes and Properties of your Layers

1. Open the attribute tables fo rach of your layers
2. Try your hand at selecting various features form the map and seeing how each feature is linked to a row in the attribute table.
3. Note how the layer properties are bing used to display the elevation as a label on your contours and spot elevations,
4. The Symbology properties of the contours layer are set to make the 0 contour blue.

## Learn how to create a Triangulated Irregular Network using Contours

A TIN is a triangulated mesh of faces that describes a surface. These are made by interpolating elevations from 2d geometries, like contours. IN ArcMap, the creation of a TIN is a two-step process. First we create an empty TIN then we edit the TIN by adding information from various types of feature classes. Because filling out all of these wizards takes time and because we will create a lot of TINs, we have created a model using the ArcGIS Geoprocessing Environment. For more information on how this works, see the reference provided below.

### References

1. Open the toolbox panel by clicking the little red toolbox icon on your ArcMap toolbar
2. Add the fp_terrain tools toolbox that is in the tools folder of your scheme_a folder. Chelsea studio: use the scapematic Site Tools toolbox.
3. Right click on the icon for Make Surface and open it by choosing Edit -- don't open it by choosing Open. Chelsea studio: find the Scapematic Site Tools toolbox and simply double-click the Site_Tin model. You need not open and edit this model.
4. Now double-click on the yellow box at the top that says Create Tin
5. Change the name of the "Output TIN" to something you can remember. Not that the Spatial Reference is st to the same coordinate system as the contours layer.
6. Open the Edit Tin process and examine all of the options. For more information about the options here, and what they do, you can click Show Help and then click the help button at the top of the help panel.
7. The TIN to Raster tool converts the TIN surface to a raster that can be used as a terain surface. in ArcGlobe
8. Now you can run this model to see what it does, by closing the Edit Tin dialog, right-click on the Edit Tin box and choose Run.
9. This should create a new surface and add it to your map
10. Calculate the volume and surface area of your terrain model with the Surface Volume tool (which can be found in ArcTools under 3D Analyst Tools->Functional Surface The area and volume are displayed in the console window that pops up when the tool is run. You can also do this from the 3D analyst menu, which can be added to your toolbar.

## Exploring and Understanding TINs

The TIN surface you just created is displayed with its faces shaded by elevation and it shows its hard edges -- those which were forced by stipulating that the streams and contours should be treated as Hard Breaklines. We can understand this surfcae better if we cange the symbology to show the edges of all of the faces. We can also adjust the symbology to shade TIN faces according to their slope and aspect. We can also view the TIN in 3d by opening it in ArcScene!

### Displaying TIN Surfaces (ArcGlobe Option)

ArcScene is the earlier version of ArcGlobe. It works almost identically with ArcGlobe, but it displays TIN surfaces. SOme people prefer this as a way to visualize terrain.

1. Open the document, Arcglobe.3dd that is in your template folder.
2. Taka a look at how Arcglobe is displaying the raster that had been made from the TIN. Try adding your new raster elevation model, rigth click on its layer name and Redefine as an Elevation Layer.
3. Set the elevation properties of your scanned map so that
4. Now you can click off the original elevation layyer and turn on the new elevation lasyer and observe the difference.
5. Take a look at the elevation attributes of the Boundary layer that make it simulate the height of the water. YOu can use these properties to simulate the tide going in and out. For some reason this only looks decent if you are close to the ground. Next week we will see how to do this in a better rendering environment.
6. Your visualizations will be most effective if you show your terrain from eye level. Animations, even very simple ones where the camera pans or moves in an arc around the site are most effective

### Displaying TIN Surfaces (ArcScene Option)

ArcScene is the earlier version of ArcGlobe. It works almost identically with ArcGlobe, but it displays TIN surfaces. SOme people prefer this as a way to visualize terrain.

1. Open the document, ArcScene.sxd (Chelsea studio: open a new arcscene document)
2. Taka a look at how ArcScene is displaying the TIN. Try adding your new TIN and adjusting the property of the buildings layer so that it references the new TIN.
3. Set the elevation properties of your scanned map so that it drapes on the TIN.
4. Make your scanned map 50% transparent
5. Bring in your site boundary layer, make it blue and transparent and extrude it to simulate the water in naraganset bay.
6. Your visualizations will be most effective if you show your terrain from eye level. Animations, even very simple ones where the camera pans or moves in an arc around the site are most effective

## Modifying Terrrain

So now that you understand terrain surfaces, and how they are made from essentially 2-D (or 2.5-D) components, it should be clear that if you can create and edit the 2-D components, you will be able to generate new surfaces. So this next section will provide an opportunity to learn the basics of editing contours, streams and masspoints in ArcGIS. We will be looking at three basic procedures: adjusting the snapping environment, creating new features, and modifying features, and setting their elevation attributes. After a little bit of practice with these trechniques, with attention to how your arrangements of components affect the character of the terrain, you may become quite fluent in speaking in contours, creating elegant, eloquent terrain surface representations!

### Add the Editor Toolbar and Look at its Settings

1. Right-click on your toolbar and select Editor to bring up the editor toolbar, if it isn't already open.
2. Chose Start Editing from the Editor menu.
3. Set your Editor Target so that you will be editing your contours layer.
4. Take a look at all of the different editing tasks available under the Task pulldown menu. Leave the task set to Create New Feature
5. Grab the Pencil Tool to begin making a new contour. Make sure that your contours layer on the map is visible -- turn off your TIN layer if it is on, and turn on your drg.tif, and turn on contours.
6. Zoom into the map to where it says "Fields Point". Notice the contour that passes through the word POINT, is missing. The contour interval on this map is 3 meters (we can tell this by exaning the laebeled contours and their logical order, assuming that the shoreline is 0 meters. 'newcontour.jpg', 'docs', 800, 640, true);return false"> see picture
7. Beign clicking with the pencil tool to click just a copule of vertices of your new contour but stop before finishing it. Now go to your Editor Snapping options. Click on the snapping options for your contours layer VErtex, Edge and End for your contours layer. Now back to the map (we are still using the pencil tool) notice how your cursor snaps to the various parts of a contour -- but not the sketch you are making!.
8. Now look at the bottom of your snapping options panel, and note that you have options for snapping to the Edit Sketch which is whatever thing you happen to be editing.
9. Now look at how your snapping behaves.
10. Finish editing this contour, being sure to follow the original contour on the USGS map.
11. Open up the attribute table for your contour and update the elevation for your latest contour (it should be 3 meters.)
12. Now read the ArcdGIS online help under Editing in ArcMap->Editing Existing Features->Moving Verices to see how to modify an existing feature. And practice this. One very confusing thing that can happen here is that when you try to select something, you may instead be selecting the overall boundary. You can remedy this by turning the boundary layer off, or making it unselectable with Selection->Set Selectible Layers

As you go on to various sorts of geometry editing environments, 2d and 3d you will find that the ability to control snapping -- even in the midst of editing something -- is very important. This is also an opportunity to talk about the logic of contours. Contours should never touch eachother -- and TINs cannot express a perfectly vertical face -- why?

### Generate a new TIN

1. Use what we learned a few paragraphs ago to generate a new tin that incorporates your new contour. This is as easy as:
2. save your edits and
3. Use Selection->Clear Selected Features to make sure that none of your components are selected. If they are, you may get a very small TIN.
4. Run your Terrain Model again. Remember -- you have to change the name of the output surface -- arcmap won't write over your old TINs.
5. Adjust the symbology of your new tin to show all of the various kinds of edges.

### If you have problems with EditTin

• Make sure you have saved your edits
• Make sure you use Selection->Clear Selected Features to make sure nothing is selected when you make a tin. If any features in a layer are selected, these will be the only features in that layer that are considered by the interpolator.
• Look at the attribute tables to make sure that all of your contours and masspoints have elevations.
• Look at the layer settings in the Edit Tin process in your model. Make sure that you are using the "Elevation" field from the Contours and Masspoints layers and that the Elev_F for boundary and Streams is set to "None".

## Thinking About the Logic of Terrain and TINs

Composers of all types, if they are good, work with logical constructions. Terrain in the world usually conforms to some specific logical expectations. For example, Water runs to the sea. unless you have some underground cave network or a system of drains and pipes... In natural landscapes, and also engineered ones, almost no place is completely flat. The way landscapes form and are designed is so that water has a regular pathway off of surfaces. As designers, we do not want to leave this important logical quality of our terrain to chance or the whim of some mindless terrain interpolator.

In our composition, we must also consider the logic of TINs. Our TIN generating routine tries to make the most compact traingles to interpolate between points or vertices of lines. The TIN interpolator chooses which vertices to connect as faces using a method known as Delaunay Traingulation Though the descrioption of the algorithm is complicated, it isn't hard to develop an intuitive sense of how the placement of points and vertices with elevations will affect the resulting triangulated mesh. To help with this, try This cool applet. A good terrain modeling tool gives us an ability to control exactly how this traingulation works and thus to preciscely control the logic of your resulting terrain surface. We do this by adding breaklines and masspoints.

So here is how we can add a few more 2.5 terrain model components to cmpose a more logicaly elegant surface:

 A familiar Starting with a TIN that has been naively created with the simple addition of a contour. It has lots of unnatural flat places. Especially in a place where a bend in the contour, pointing uphill tells us that this is a place where water runs down. We will specify exactly where the drainage channel runs off of our new hill by adding a Breakline. In our TIN editing environment, the streams are interpreted as Hard Breaklines which force an edge of a face, and are not interpolated across. Effectively a hard breakline creates a barrier in the Delauney traingulation. Spot elevations along the hill help us to model the grade of the stream. by adding these to our masspoits layer, making sure to snap them to the vertices of the stream. Our Edit TIN model interprets these as Masspoints. We must add the elevations of the masspoints in their attribute table. While we are at it, we will add some points that define the exact heights of spots on top of our hill. Masspoints help us declare exact heights that aren't on contours. We can use these also to control the triangulation, preventing the creation of awkward very long acute faces, which will cause us problems if we want to manipulate the TIN by tweaking vertices in a 3d editing program. Now we have a much more Locialy-Behaving Terrain Surface! Here's a 3d View of the new terrain surface

Another software note Some 3d modeling tools will give you rounded hilltops given only contours to define the surface. This is done by fitting a spline curve to the contour vertices. This is a good quick and dirty technique to make the models look more logically convincing than they otherwise would be without information about what happens between the contours. However, if you want to be in control of how tall your hills are, and where your drainage will be (or if your terrain will drain at all...) then you should compose your terrain with a tool that lets you specify breaklines and masspoints.

### Articulate your Model

1. Add a stream going up the hill. Bends in contours always point upstream. Be sure to snap your stream vertices to the verts in your contours.
2. Add masspoints that define the height of your stream. It is not necessary to add masspoints where the stream is snapped to a contour vertex. (Chelsea Studio: in yodur model you will create a 3d breakline and edit its vertices as described at: Editing the Propereties of a Vertex
3. Edit the attributes of your masspoints to set their elevations. Keep in mind that above the top contour the height should be between 6 and 9, etc.
4. Add more masspoints to define two or three high spots ontop of your hill
5. Add some more masspoints in your model to eliminate some of the very long acute triangles. Don't forget to update the elevations of all of your masspoints.
6. Save your edits, clear all selected features and make a new TIN and look at its new edges.

### Some Fine Points

 The art of making good terrain meshes is in keeping the the number of faces to a minimum. You also want to avoid having a lot of very long, acute triangles. Models with a large number of faces cause a lot of problems when you try to use them to make animations. Models with very long, knife-like triangles are difficult to edit: you will find that changes in one part of the model will end up causing problems in other places. Here are a couple of things to note in my model of my proposed Starvegoat Beach and picnic area:

### An Analytical Visualization

 Here are some visualizations of a proposed grading scenario for Starve Goat Beach and Picnic Area. This proposal uses 500,000 cubic meters of fill. We dredge out some of the old fill to reveal the old starvegot island. We create a protected swimming area with a large breakwater, which also serves as a promenade. These modifications are created such that at low tide, the island is accessible yet there is still water in the swimming/wading area. Most of the fill is used to create a terraced berm that has a picnic area that overlooks the beach, swimming area and island. There will be buildings on top of this berm. The berm blocks the view of the industrial area from the island and the picnic area. Here are some views of the beach area from the picnic terrace at High Tide and Low Tide