Geographic Information Systems (+/-)
Data Resources (+/-)
Data Handling (+/-)
Effective Cartography (+/-)
Analytic Techniques (+/-)
Topographic Modeling in 3D (+/-)
Metropolitan Scale 3d Models (+/-)
  Computer Resources GIS Manual  

Terrain Data

Many design projects benefit from an understanding and representation of the local terrain. Terrain data is surprisingly easy to obtain and convert into useful representrations that may be used in GIS and also popular CAD formats. This page discusses the uses and sources of terrain data and tips for creating relief-shaded maps, creating triagulated surfaces that may be exchanged with 3d modeling tools and for exporting contours to CAD for cutting physical terrain models on the laser cutter.

Some things you can do with digital elevation models

Digital Elevation Models (DEMs) are a type of raster GIS layer. Raster GIS represents the world as a regular arrangement of locations. In a DEM, each cell has a value corresponding to its elevation. The fact that locations are arranged regularly permits the raster GIS to infer many interesting associations among locations: Which cells are upstream from other cells? Which locations are visible from a given point? Where are the steep slopes? One of the most powerful applications of DEMs is adding synthetic hillshading to maps so that the map reader may see the relationship between terrain and other things you may be mapping.

A Digital Elevation Model (DEM) is a raster of elevation values. Rasters represent the world as regular arrangements of pixels (cells). Rasters lend themselves to systematic analysis of the relationships among places and their properties.

For example, a Raster GIS can calculate many useful derivitives of elevation, such as: Slope or Aspect -- the direction of slopes or Visibility -- what is visible from a spot?

Synthetic Hillshade calculated from a DEM is a great way to create visualizations of terrain with other semi-transparent themes. DEMs can also be used to create 3-D scenes or to create contour which may be exported to CAD programs.

Download the Sample Dataset

To save time in this tutorial, and to eliminate crazy variables that may cascade from oddities of your particular download, the rest of this tutorial will use the following sample dataset:

Deeper Reading


Finding Free DEM and Land Use Data on the Web

National Elevation Dataset and NLCD, National Land Cover Characterization Dataset are a complete seamless coverage of DEM and Land Cover. These are available for free download via USGS Seamless Data Viewer THis web site makes liberal use of popups which seem to be very difficult to pass through Microsoft Internet Explorer. I recommend that you use Mozilla Firefox. YOu should also make sure that if you have google toolbar, that you shut off its popup blocker for this particular site. YOu will see the USGS Seamless Tutorial linked at the top of the browse page. You should open this in a new window for reference while you are using the browser. I won't bother to repeat the instructions for downloading DEMs here.

Hint: The 1/3 ArcSecond Elevation data and the 2001 Land COver Data are not available for all areas. For this tutorial, I recommend that you download the 1" NED Data and the 1994 NLCD.

References:

Download your Elevation Model and Land Use Raster

  • Use the seamless browser to download an Elevation Model, and if you like, you can also download orthophotos and a land use raster.
  • Zoom into a Modest sized area -- to start with, keep the scale of your browser window less than 1:100,000.
  • Click on and off layers in the display tab to find out if they exist for your area of interest.
  • IN Firefox, check the status link at the top of the download page. Even after it says there has been a error, it will finally present you with a download link.
  • Create a working folder in c:\temp\your_username\downloads to hold these datasets.
  • To keep things clear, I recommend that you create a separerate folder for the DEM and for the land use data as you are extracting them.
  • Use Windows Explorer to explore the contents of the data you just downloaded.
  • Note the metadata.

Important Notes on Handling Grids

The rasters you get are ArcInfo Grid datasets, which are not files, but interrelated directories (or folders) information which have to be handled carefully to avoid rendering them unreadable. The easiest axiom regarding the handling of GRID datasets is Never use ordinary file-system tools to move or rename GRID datasets. Always use ArcCatalog or ome of the wizards from ArcToolbox.

Additional Notes about Naming Grids and Workspaces: Grids, and the folders that contain them, and any folder involved in the path from the disk up (e.g. c:\temp\myfolder\workspace\grid ) must not have names that begin with numbers; nor may any of these have spaces in their names! This is a legacy back to the days when it was impossible to have these things, and for some unkown reason, breaking these rules will cause mysterious and annoying things to happen -- none of them good.

References:

Explore Your Grid Datasets
  • Check out the properties of two grid layers in your project.
  • The colorful map layer is your Land Use Map, the Grayscale one is the Elevation Model.
  • Look at their source properties, especially the spatial reference and the cell size.
  • Use the Get Info tool to check the properties of cells
  • Try to look at their attribute tables. The DEM Grid has more than 1000 discrete values, so ArcMap dos not show an attribute table for this one.

Choosing a Local Coordinate Referencing System

Extracting pieces of the US Geological Survey's golbal digital elevation models requires an understanding of earth-based coordinate referencing systems. A review of Principals of Spatial Referencing Systems, will explain why a Geographic Coordinate System, which references locations using latitude and longitude, is the only commonly used spatial referencing system that can reference distinct locations anywhere on the planet. However, to think of latitude and logitude as coordinates in the cartesian sense, is completely foolish. The relative lengths of a degree of latitude on the face of the planet, may be more than twice the distance spanned by a degree of longitude, depending on where you are measuring. This presents a problem if we want to measure slope, create relief shading, or to compare the relative sizes and shapes of things in a truthful or non-stupid way. Therefore, before we can do anything with digital terrain models, we need to know how to choose an apropriate coordinate system for the location we are studying. The simplest guideline to follow in choosing a local coordinate system is to use the appropriate zone of the Universal Transverse Mercator Coordinate System. The tutorial dataset includes a utm.shp layer that will help you determine which UTM zone your location falls inside. For future reference, you can find this shape file in your c:\program files\arcgis\reference systems folder.

Choose a Local Coordinate System

  • Turn on your UTM layer
  • Zoom out until you can see the red lines that define the UTM zones.
  • Click on your zone with the Info tool to reveal its number. We are in UTM Zone 19.
  • Lets set our data frame projection to project our data apropriately.

Transformation of a Datasets CRS

By changing the projection of the dataframe, above, we have not altered the inherent geometry of our data. You can check this by re-checing the properties of your layers. If you review the Tutorial on Projections in ArcMap you will understand how this ability to transform the portrayal of a dataset works. It depends on the fact that the inherent coordinate system of the dataset is identified correctly in the dataset's properties. It is important to keep in mind in setting the Spatial Reference Identification in a datsaset's properties, there is only one correct setting that this can have. SImply changing this piece of metadata does not change the actual coordinate systems inherent in the data, and will, in fact make the whole projectrion-on-the-fly situation hopelesslky confused. This is why in the next few steps, we will learn how to use geoprocessing tools to actually transform the CRS that is used insiude the dataset itself.


Reprojecting Rasters

You ought to be able to reproject your rasters using the appropriate tools in ArcToolbox, but there seems to be a bug in this tool that chops out sections of the raster. SO until they get it fixed, we will sugggest this workaroud.

  1. Choose a Projection: The easiest way to choose an appropriate projection fror your raster is to use the apropriate zone of the Universal Transverse Mercator system from this handy map of UTM Zones. Or you can load the UTM shape file from your c:\program files\arcgis\reference Systems folder, which will allow you to see precisely what UTM zone your elevation model falls into.
  2. The earth model used by the USGS for these elevation models is The World Geodetic Sphereoid of 1984 So when reprojecting your raster, or using the tools from the toolboxes discussed below, you should choose a projection from the folder Projected Coordinate Systems->UTM->WGS 1984.
  3. Open the properties of your dataframe by double-clicking the word Layers at the upper left of your table of contents.
  4. Set the coordinate system of your dataframe, choosing it from Predefined->Projected->UTM->WGS84->Your Zone
  5. Right-click the raster you wish to reproject and export the data to a new raster using the same coordinates as the dataframe. Be sure to specify square cells! See Picture.

Transforming Rasters with Geoprocessing Tools

Digital terrain models are interesting to look at, but more importantly, they can be transformed into many other useful datasets. We can calculate slope and aspect, we can make shaded relief that makes the terrain model much more informative graphically. We can even create contours at whatever contour interval we want. Contours are also useful graphically, but also for laser cutting and exchange of three dimensional models with other programs. Probably the most efficient ways to terrain information out of GIS and into a 3d modeling package is as a trangulated surface. THJis is also quite easy to do!

We will begin by transforming our raster TIN using wizards form the ArcGIS Geoprocessing Toolbox. You will see how to use the individual wizards in the toolbox. Once we have done this a few times, you will see that there are some settings that we have to keep setting each time we run a tool. We will learn to set default geoprocessing environment for a tool, or for the entire map document. This is just the beginning! A the end of this document, you will see how geoprocessing tools can be chained together to create custom tools that will let us automate some complex tasks and make environment settings part of our custom wizards!

Note! if you try to use a function, as is suggested below, and get an error to the effect This Tool is not Licensed you should go to Tools->Extensions and check the boxes next to 3d ANalyst and Spatial Anayst


Transforming Elevation to Slope and Aspect

These three tasks will allow us to introduce the toolbox and a few simple wizards. It is always important to check the results of each operation to make sure the results make sense. It is really easy to enter the wrong thing into one of these wizards and to obtain a result that might look reasonable, but on closer inspection makes no sense!

References

Create Slope and Aspect Rasters

  1. Create a slope raster.
  2. Inspect the result with the Get Info tool.
  3. Take a look at the symbology properties of the raster. Try adjusting the number of classes, or to use a stretched spectrum of color to portray the raster.
  4. Do the same thing for an Aspect raster.

Making Maps with Terrain Shading

One of the most useful applications of terrain models is the simulation of hill shading which informs 2-dimesional maps with information about the terrain. To do this you will need to load the spatial analyst extension, and add the spatial analyst toolbar (see items in ArcGIS online help table of contents under Extensions->Spatial Analyst->Getting Started

A hillshade grid can be made easily by choosing Hillshade from the 3D Analyst->Raster Surface Toolbox. Even though the default sun azimuth (315 degrees, northwest) may never actually occur at your site, you should use this (or some other northern angle.) Setting your synthetic illumination to be in the north is an important convention because shading works because your eye can easily imagine bumps sticking out of the maps, are being highligeted by the source of light in the room (which is normally overhead.) If the illumination is coming from below, the eye and brain still assume that things are highlighed from below, so the map will appear inside-out.

Check out these examples: Mouse over the words in the left column to change the image

Conventional Illumination This sun angle, 315 degrees, never occurs in Oregon, but the hillshading makes the mountains appear to pop out appropriately. Note that the stream is running through the valley to the river.

Natural Illumination This sun angle, 135 degrees, (Southeast) may simulate a mid-morning condition for the site, but the trick of synthetic hillshading makes the valleys, not the mountains appear to pop out! Hillshading is an optical illusion that takes advantage of our assumption that the illumination is from overhead and shadows occur underneath things, not on top of them.

Natural Sun Angle, map oriented north-down With this map we can have a natural sun angle -- and effective relief shading -- at the expense of the cartographic convention for keeping north at the top of the map.


The Geoprocessing Environment and Making Contours

Lets open up the slope wizard one more time and click the Environment button and take a look at some of the settings under General Settings Note that properties may be set such as the Output Projection and the Output Extent can give you powerful ways to clip and reproject and perform other operations all in one step. This is very handy. The Output Workspace and the Scratch Workspace let you set up the default location for the outputs of geoprocessing operations. This is particularly useful if you consider that while you may set the environment for one wizard/operation, you may also use Tools->Options->Geoprocessing to set up these environment properties for all of the operations that you do within a single map. For example, we can environment settings to make contours from our original unprojected raster elevation model and convert X, Y and Z units to feet all at the same time!

References

Create Contours

  1. Go to Tools->Geoprocessing->Environment and set the environment General Settings for Workspace and Scratch Workspace and Output Extent and Output Projection. Choose Rhode Island State Plane Feet for your output projection.
  2. Open the 3d Analyst->Raster Surface->Contours tool.
  3. Open the help panel on the wizard, and mouse over the different fields.
  4. Click the Help link at the top to look at the entire help document.
  5. Take a look at the environment general settings of the contour tool
  6. Set the contour interval to 2 and the Z factor to 3.28 and run the contour tool.
  7. Experiment with a base contour of 0.2 to try to eliminate some of the jaggies along the shoreline.

Using Models to Chain Together Series of Geoprocessing Steps

The following parts of this tutorial demonstrate how chains of geoproceesing steps can be put together in models, which are essentially custom tools. In addition to providing a means of pulling several wizards into a single tool. These models allow you to chain the output of one wizard into the next, and also let you fill in the blanks in some of the wizards, and expose other wizard options and environments to the user through a simple interface.

We aren't going to go into all of the techniques of building models here. One of the neat things about models, is if they are designed well, the user doesn't necessarily need to know what is going on inside. Another really good thing about them is that they allow an expert to very suscinctly document a procedure so that users can see exactly what is going on if they are interested. There are some very useful models included with this tutorial, that do things like creating generalized contours and clipped out Triangulated Mesh Models this will be a good occaision to take a look at them and see how they work. We will get to that, but first lets create a simple model to create contours to introduce the basic contents of a model.

References

Geoprocessing Tip Sheet

  1. Create a model that smooths your raster using focal statistics before you make contours
  2. Add a function to your model that eliminates needless vertices by adding a Simplify Line tool to your model.

A One-Step Process for Converting Raster Terrain Models to CAD

Most GSD students think that they have to do everything in CAD -- even though CAD applications are really bad at dealing with very large models and real coordinate systems... Anyway, if you really want to have a terrain model in a CAD package, GIS can help. As you will see from the references above, converting 3d contours to AutoDesk formats involves a couple of steps. Luckily thanks to Geoprocessing models, I have been able to wrap all of the smoothing, a raster turniong it into contours and simplifying them and finally turning it into a DXF file -- all in one step!

References

Turn Raster Terrain Models to Contours with any given contour interval

And Excess Vertices that make your CAD meshes needlessly complex can be Removed!

and the resulting contours are converted to DXF!

YOu may also be interested in the superior meshes that are created directly from raster terrain models These can be made with a tolerance that lets you get the essential information from the terrain model without any excess polygons.

these meshes can be exported to Sketchup and in turn exported to dxf of 3ds formats.

Note! if you try to use a function, as is suggested below, and get an error to the effect This Tool is not Licensed you should go to Tools->Extensions and check the boxes next to 3d ANalyst and Spatial Anayst

Using the GSD Terrain Tools

  1. Make sure your data frame coordinate system properties to a projected coordinate system as described above. These tools will crash if you fail to project your dataframe accordingly.
  2. Look for the GSD Terrain Tools toolbox Then simply double click on the tool you want to use. If you don't know what values to fill into the blanks, simply click on the blanks and look for the tool-tips in the help panel on the right.
  3. YOu may want to try this tool several times with different settings to get the reults you want.

Converting to TIN and Exporting to Sketchup

To export your mesh to sketchup, install the sketchup arcgis plugin into ArcMap. If you are on a computer in room 516, this can be accomplished by choosing Tools->Customize and simply check the box for Sketchup 6 Tools. If you need to install the sketchup5 plugin for ArcGIS on your computer, go to the the winapps/sketchup directory, and follow the instructions.

TO export your TIN to sketchup, simply push the sketchup button, and go to the TIN tab, and uncheck the box that says 'Exclude form Export.'


Visualizing your Terrain Data in 3d

Apologies for this cursory teeaser here, but it will have to do for now. It is surprisingly easy to create visualizations of your terrain data in 3d uusing ArcGlobe. YOu will find useful information about this in the Using ArcGIS 3d Analyst User Guide..

If you open the dem_demo_pt2.mxd in the gis/pbcote/docs folder of your sample dataset, yoiu will see a nice project that makes a nice image overlay using the raster elevation model and contours portrayed in nice colors to indicate land and water, and overlayed transparently on top of the areial photograph. This image was exported as a jpg withg a world file from ArcMap using File->ExportMap. This jpeg will be georeferenced with a world file, and will inherit the projection of the data frame from which it was exported. You wil lhave to use arcCatlog to uypdate the spatial refernce properties of this image before it will open in arcglobe. All of this is worth it, as you will see, if you open the fp_3d.3dd file in gis/pbcote/docs. Consult the 3d Analyst use guide to see how this file can be used to visualize your terrain and buildings in 3d! Hint: movew the DEM layer to the elvation layers group!


Decifering and Reclassifying your NLCD Data

Each cell in the NLCD dataset is codes with an integer value that represents a class from the Anderson Lancover Coding System. You can download an apropriate lookup table here. Notes on using lookup tables are Here.