USGS Elevation Data with Terragen 2

Concept for this Terragen 2 Tutorial

Terragen 2 allows the import of georeferenced DEM (Digital Elevation Model) data in the GeoTiff format. This Terragen 2 tutorial will allow anyone to quickly and easily load real world locations to be rendered in Terragen 2. A major difficulty to this process is both finding and figuring out exactly what to do with the data that you download. This tutorial will provide an overview of how to use the USGS Seamless Data Viewer to obtain DEM, Satellite and Raster Map information as well as how to load this data into Terragen 2 as easily as possible. Some knowledge about geographic information systems would be of benefit, but should not be totally necessary.

Software used

GlobalMapper or a free GIS package may be required to merge DEM files or convert Datums/Projections of the overview maps. Examples will be provided for these special case problems.

Data

Data for this Terragen 2 tutorial will be obtained from the Seamless Data Warehouse provided by the USGS (United States Geological Survey). There is plenty of other GIS data available online at varying detail levels that you may be able to apply these same principals to. A major benefit from using the seamless.usgs.gov data is that it is available in the GeoTIFF format which can be read directly into Terragen 2 without having to do any major conversions.

An alternate site for worldwide data is the EarthExplorer website where you can search via a Google Maps type interface: http://earthexplorer.usgs.gov

Seamless Data Warehouse Website – http://seamless.usgs.gov

From the homepage select the Seamless Viewer link on the left hand side of the page. This will launch the Seamless Viewer application which has many options and tools for viewing and browsing the data.

Data for this Terragen 2 Tutorial

On the left hand side of the screen you can see a number of different tools that can be used to zoom, pan, search, measure and select information on the main map window. On the right hand side there are two tabs, Display and Download. Display has options that allow you to view many different layers and styles of information in the main map window. Download allows you to specify the types of information and data that you would like to receive for an area selected on the map.

There are various ways to manipulate the map to find the location that you are interested in, but for simplicity sake simply use the “Zoom In” tool to browse to an area on the map you are interested in. For this tutorial the Grand Canyon area is a simple way to show the data in practice.

Once you have an area zoomed in you need to select what type of data you want to download. You can do this by clicking on the “Download” tab to the right of the map. This will bring up a very large list of available data types. For this tutorial we are going to download the 1/3" NED data under the Elevation list so uncheck the default 1" NED data and select the checkbox for the 1/3" NED. This will give us some fairly detailed DEM data. Other options that may be of interest are located under the Orthoimagery heading. The available images depend on the location you are viewing. Some areas/states have more data than others. For the area in the tutorial we are going to download the Landsat Mosaic (which is a satellite image), 24k DRG Zone 12 and 100k DRG Zone 12 (which are raster topographic maps).

From the tools section on the left select the “Define Area by Multiple Template Selection” tool. This will give you a drop down list below the map of various templates for download areas. Select the 0.5 x 0.5 Degree WGS84 Grid (North America) template and you will see a grid appear on the map. Select the tiles that you wish to download and click submit.

Depending on the area you selected you may get a very large list of files. By default the DEM data is downloaded in an ArcGRID format which Terragen 2 cannot directly read. At the top of the results page there is a link called “Modify Data Request” click this to change the options for file types.

Scroll down until you get to the Elevation section and find the type that is checked (National Elevation Dataset (NED) 1/3 Arc Second. Change the drop down box from ArcGRID to GeoTIFF. At the bottom of this page there is also an option for the maximum size per tile. I typically change this to be the largest size possible to reduce the number of tiles required to cover a given area. When done select “Save Changes and Return to Summary”

You can now download all of the data on the Request Summary Page by selecting the download link beside each file. You may wish to make a note of the area covered in Lat/Long which is displayed here but it is not strictly needed and should be read by Terragen anyway. Once you have the data downloaded you will need to unzip all the files.

What was Downloaded?

Now that the files have been downloaded you might be wondering just what they are. Following the tutorial we now have the following resources:

This is what the NED 1/3" tile looks like. This is the file that will make the terrain when imported into Terragen 2

This is what the Landsat Satellite image looks like. It is a false colour image that is showing the vegetation as a red colour. A future tutorial may be made available to show how to process your own images to obtain alternate results. This will be used as an overlay image in Terragen 2

This is what the 100k Topographic map looks like. This will be used as an overlay image in Terragen 2

This is what the 24k Topographic map looks like. It is similar to the 100k map but at much greater resolution. This will be used as an overlay image in Terragen 2

Importing the Data

Now that the data is downloaded and extracted it is time to use it. Open the Terragen 2 application and select the “Add Terrain” Button and choose “Heightfield (load file)” You will then need to browse to the location of the data you saved. You will need to change the “Files of type to display .Tiff files instead of .ter files which is the default. Select the GeoTiff file of your area.

You will notice that once you load the heightfield, unlike when you add a non-georeferenced heightfield nothing has appeared in the preview window. This is because the heightfield you just loaded is actually georeferenced to the planet and it is unlikely the viewport is directly centered on the portion of the planet showing your heightfield.

To make your heightfield visible you will need to enter two values into the “Lat long at apex” fields contained within the Planet 01 object. What adding these two numbers does is recenter the 0,0 point of the planet to be located near your heightfield.

The values you enter into the “Lat long at apex” fields are determined by the Lat/Long of the data you imported. Typically using the center point of the data as the Lat/Long at apex is a good idea as it makes it easy to orient additional images later on, but a corner point of your data would likely work fine as well. For this example the Lat/Long used was 36.25, -112.25. Once you enter those values you may find that the current camera is under the terrain of your heightfield so you will need to move the camera around somewhat.

Now that the data is correctly loaded into Terragen 2, you can either stop here and treat the terrain the same as you would any standard heightfield or procedural image that you create, or you can continue to add more data in the form of maps, masks etc.

Starting with the easiest image, the satellite data we downloaded is conveniently in the same projection as the DEM heightfield so no outside conversions are needed to load the data into Terragen 2. The only trick is to get the data positioned and aligned correctly.

Because the Landsat image is in the same projection and datum as the DEM file and also covers exactly the same area we can simply use the sizes listed in the DEM Heightfield node to obtain the size required to project the satellite image as an image map. If you are using a file that may not be exactly the same size (such as the DRG style topographic maps), please see the following instructions for a quick way to verify the sizes required.

Since the Landsat image that we downloaded is in a Geotiff format we can load this map as a Heightfield in order to get the size required to project it as an image map. Simply follow the same instructions as before for loading the DEM data. Once open, if you check the “Heightfield Load” node, you will see that the file is georeferenced and in the Statistics section you will be able to see the XY size in Meters required to load this map as an image map. In this example the size is 44741, 55658

You can now either disable or delete this node (once making a note of the above size, as this file cannot actual be used as a heightfield as it contains no elevation data.

To load the image as an overlay, first create a “Surface Layer” in the Shaders tab and then Add Child Layer “Image Map Shader” and select the Satellite Image that you downloaded.

You will now see the satellite image projected across your terrain but it is not in the correct position as the default projection is “Through Camera”. To correct this in the Image Map Shader, change the Projection type from “Through Camera” to “Plan Y (edges = XZ)” and enter the values found above into the Size fields. Then select “Position Center”. You should now see your satellite image overlaying the terrain correctly.

The other two topographic images that were downloaded (100k and 24k topographic maps) are not quite as straightforward to import. This is because the Projection and datum that they are in does not match the projection and datum of the DEM data and Terragen 2 does not convert projections or datums. In order to use these maps, they need to be converted in a GIS application. For this tutorial GlobalMapper is used to do the conversion, but other free applications may be available.

The DEM and Landsat data are both in a Geographic (Lat/Long) projection using the NAD83 datum while the topographic maps are in a UTM (Universal Transverse Mercator) Projection using the NAD27 datum. We need to convert these maps to match DEM data.

Open GlobalMapper (or your GIS application of choice) and load the 100k file. Under the Configuration options select the Projection tab. It will look similar to the following:

Change the projection from UTM to Geographic (Latitude/Longitude) and the Datum to NAD83 and hit apply. This will change the shape of the map into the Geographic projection.

You can now export this image as a GeoTIFF. Since there is no elevation data select the 24bit RGB (if you want colours and image quality to be preserved) or 8bit if you want a smaller file size. Also make sure to Generate a TFW and a PRJ file when exporting.

You can follow this same process for the 24k map as well. Note: In this example there were two 24k tiles that needed to be opened and saved out as a single (very large) file. If you are not using the 64bit version of Terragen 2 (Version 2.3 or later) you may run into memory issues using very large image maps.

Now that the files have been converted, you can load them into Terragen 2 following the same process detailed above for loading the satellite image.

The following are a variety of renders from the terrain we imported with the 24k DRG topographic map overlayed on top of the terrain




Final Comments

If you made it through all of that I hope that you take away a little bit more understanding about how to use various sources of data to improve your Terragen 2 renders

Any comments, suggestions or problems can be sent to:

Ryan Archer
r.archer@shaw.ca

archer-designs.com