Constructing Topographic Profiles

advertisement
Constructing Topographic Profiles with and 3D perspectives with ArcGIS
10.x
Introduction
Topographic profiles are used to provide a scaled “cut-away” slice view of a topographic surface along a
specific azimuth. These are useful in a variety of scientific disciplines, but especially in Geology where
the profile is the first step in the construction of a geologic cross-section. In a topographic profile the x
axis represents the distance along the profile azimuth, and is always the same scale as the base map.
Usually the ends of the profile are annotated with “A” to “A’” or something similar so that there is a
cardinal direction sense to the profile. In general the profile should be constructed in the same map
coordinate system as the base map from which it is derived, but offset below or to the side so that it
does not interfere with the base map. In this example we will use a second data frame in the layout to
contain the profile.
Base Map Setup
In order to use the 3D Analyst tools you must somehow add a 3D aspect to your base map. In this
project we will use the Talladega Springs Geologic map that has already been constructed in a previous
project. In that project a digital elevation model (DEM) was added to the base map in order to construct
a shaded relief aspect to the map. This DEM raster also adds the elevation information to the map,
however, the 3D Analyst needs it in a TIN format so the initial step is to create a TIN from the DEM.
Load the Talladega Springs project in ArcMap. Verify that the DEM is still part of the project (note that it
may be turned off). In order to generate a TIN of sufficient detail to provide a smooth 3D topographic
surface the raw DEM data needs to be interpolated into a denser grid. There are several ways to do thiswe will generate topographic contours with Spatial Analyst and then derive the TIN from that feature
class. Activate the Toolbox and open “Spatial Analyst Tools > Surface > Contour”. Use the settings in
Figure 1 to generate metric topographic contours. Name the contours “contours_m” because they are in
metric units.
Expand the ArcToolbox and use the “3D Analyst Tools > Data Management > TIN > Create TIN” option to
activate the window dialog in Figure 2. Make sure that you direct the TIN output to your project folder
for the Talladega Springs project. Select the “OK” button to generate the TIN. Name the TIN
“dem_tin_m” because the elevations are in meters. This TIN will be significantly more realistic than if
you used the toolbox option “3D Analyst Tools > Conversion > From Raster > Raster to TIN” to convert
the DEM raster directly to a TIN.
After generating the 3D TIN model of the topography, you will need to define the line that represents
the A to A’ cross section line. Use these coordinates to create a line in a feature class named “AAprime”:
UTM_X
UTM_Y
A:
546641.4
3664873.4
A’:
558385.0
3651551.0
Create this line feature in the Talladega Springs geodatabase file (TalladegaSprings.mdb). Create an
“Annotation” feature class in “TalladegaSprings.mdb”, and add the labels “A” and “A’” to the end points
of the cross section line. You should now have the elements depicted in Figure 3.
Generate a 3D Cross-section Profile Line
The next step will intersect the 2D A-A’ cross-section line with the 3D TIN to create a 3D cross-section
profile line containing numerous vertices that fall along the A-A’ line, but also have elevation values
matching the TIN. To create this line use the toolbox “3D Analyst > Functional Surface > Interpolate
Shape” selection. This will generate a line (feature class = ”Profile”) that has numerous vertices
(everywhere a triangle in the TIN crosses the A-A’ line) that contain elevation values. Figure 5 contains a
zoom in of the generated line in “edit vertex” mode. Note the elevation values attached to the vertices
in the right edit sketch window.
Create a Profile Graph
The next step is to generate a graph of the distance of each vertex from the “A” origin of the crosssection, versus the elevation of the vertex in the 3D profile polyline. Do this using the 3D Analyst toolbar
(activate now), and selecting in edit mode the 3D profile line. Now select the “Profile Graph or Point
Graph” drop-down list, and then select “Profile Graph”. This will generate a graph object that will display
a topographic profile of the 3D polyline along A-A’. “Right-click” on the graph object, and then select the
“Export” option. Fill out the active dialog as in Figure 6 to create an Excel graph of the graph data.
Figure 7 contains a screen capture of the Excel spreadsheet. Note that the 2nd column is the offset of the
vertex from the “A” end of the cross-section line, and the 3rd column is the elevation of the vertex.
The profile graph plots the topographic profile, however, it will have random scales for the X and Y
directions so it will never be quantitatively correct for a true 1:1 topographic profile. The data must be
imported into a new project so that you can control the XY scaling to obtain a 1:1 profile.
Create a New Topographic Profile Project
Save work done in the Talladega Springs ArcMap project, then use the “File > New” to create a new
ArcMap project that will contain the topographic A-A’ profile. Create a new project file using UTM zone
16 NAD27 coordinate system (same as quadrangle project). Use the “Add Data XY data” button to add
the coordinates in the Excel file created in the previous step (“Aprime.xls”). The profile should now
appear as a series of closely spaced points. For the next step the imported profile points need to be
converted into a true point feature class. Create a new geodatabase named “topoprofile.mdb” in the
project folder. Next right-click on the feature class name, and then select “Data > Export Data” to
convert to a point feature class named “3Dpoints”. Send the new feature class to “topoprofile.mdb”.
Next turn the “3Dpoint” point geometry into a polyline with the toolbox selection “Data Management
Tools > Features > Point to Line”. The dialog activated by this selection is displayed in Figure 8. Fill out
the dialog as indicated in the figure. This will add a new polyline feature that smoothly connects through
all of the profile points. Save the polyline to the “topoprofile” geodatabase feature “erosional” (Figure
9). Add these additional feature classes to the “topoprofile.mdb” geodatabase file:
Feature Class
Geometry
Description
Grid
polyline
topographic profile grid
Annotation
annotation
topographic profile text
Use these feature classes and “edit” mode to create the remainder of the topographic profile. You
should complete a project that appears very similar to Figure 10.
NOTE: you have already experienced all of the commands that you need to complete the grid.
Remember that you can enter absolute coordinates when you are creating lines with a right-click. Once
a grid line has been created it can be copied and then moved relative to its original position with the
“move” command in the “edit” menu.
Adding the Topographic Profile to the Geologic Map Layout
ArcMap projects may contain more than one data frame- a fact that we can use to good effect to display
the newly constructed topographic profile in the Talladega Springs geologic map layout. With the
geologic map loaded in ArcMap use the main menu “Insert > Data Frame” in data view mode. You will
see the map window go blank and a new data frame name appear in the TOC window. Proceed to add
the “grid”, “profile”, and “annotation” features from “topoprofile.mdb”. Name the new data frame
“Topographic Profile”. Now switch to layout view and re-size the topographic profile data frame to fit
within the layout limits. The layout window should appear similar to Figure 11.
Creating Topographic Contours
Generating topographic contours from a DEM or other raster source is often advantageous because the
contours can then be shown in 3D with ArcScene. The toolbox “Spatial Analyst > Surface > Contour”
utility can be used to generate feature class of contours. The contours will contain a numeric attribute
“CONTOUR” that contains the elevation of the contour polyline. With a small amount of Python
programming and symbology work you can also selectively plot the index contours as “thicker” line
work, and also selectively label only the index contours. You should also note that the contour
generating tool can scale the elevation values, therefore, elevations in meters can easily be scaled to
feet by using a Z scale factor of 3.28.
Generate Topographic Contours in Feet Units
Load the Talladega Springs Geologic map project file into ArcMap. Activate the Toolbox and open
“Spatial Analyst Tools > Surface > Contour”. Use the settings in Figure 1 to generate topographic
contours, but change the Z factor to 3.28, and the contour interval to 20 feet. Output the results to
“contours_ft”. The feature class will be added to the project.
In order to symbolize the topographic contours properly 2 new fields need to be added to the
“contours_ft” shape file. While not in edit mode open the “contours_ft” attribute table. Add the
following fields:
Name of Field
Type
Note
index
integer (long)
Will hold either 0 or 1: 0=non-index, 1=index
contlabel
Text (16)
Holds contour label: “ “=non-index, “500”=index
Note that index contours are always 5 x the contour interval – 20 feet for this quadrangle – and always
start at sea level (i.e. base contour = 0). Therefore for this quadrangle the index contours will be 400,
500, 600, etc. To properly display regular and index contours the “index” field needs to be filled in with a
0 for non-index contours, and a value of 1 for index contours. Likewise, the “contlabel” field needs to be
set to a blank (“ “) for non-index contours, and the string equivalent of the contour elevation value
rounded to the nearest foot (i.e. “500”).
The automatic filling in of the “index” field requires a “decision-making” capability that can only be
provided with a programming language like Python or VB. In this specific case a logical “if” statement
will be used. The same requirement is needed for filling in the “contlabel” field. In addition to the “if”
statement, also required is a mathematical way to determine if a contour is an index contour. This is
provided by the modulus operator:
440 % 100 = 40
500 % 100 = 0
In other words, the modulus returns the remainder of X divided by Y. If the index contour interval is 5 *
20 = 100, then the modulus of the contour value and the index contour interval will equal 0 when an
index contour value is encountered. The logic of the “index” field calculation in Python code would be:
def IndexContVal(contourval):
ivar = 0
if (contourval % 100) == 0:
ivar = 1
return ivar
In the expression window of the calculation query the following would be entered:
IndexContVal( !CONTOUR!)
Figure 12 displays the Python code entered into the Field Calculator window of the “index” field. Note
that the “Show Code Block” checkbox must be activated in order to enter the code. Make sure that you
save the calculation code once that you verify that it works correctly. Save the Python code as
“IndexContVal.cal”. Also note that the “Python” versus “VB” button must be selected before you click on
the “OK” button to run the calculation query. Figure 13 displays the calculation query code for the
“contlabel” field. Save this calculation query code as “MakeContLabel.cal”. The attribute table for
“contours_ft” should now appear as in Figure 14. Note that only index contours have a non-blank
“contlabel” field, and we can now separate index from non-index contours based on the “index” field
value.
The symbology of the contours can now be set:
1. Use the “Properties > Symology tab” to categorize the “contours_ft” feature class based on the
index value. Set a brown color and 0.2 width line for non-index contours, and a brown color and
0.8 width line for index contours.
2. Use the “Properties > Labels tab” to turn on labels for the “contours_ft” feature class. Use the
“contlabel” field with a label size of 5.
Figure 15 contains a zoomed in view of the effect of the above symbology and labeling settings.
Modelling the Talladega Springs DEM in 3D with ArcScene
The ArcScene application is specifically designed to model 3D data so it can be used to construct 3D
views of the Talladega Springs topography. The critical step is to convert the 3D DEM data to a TIN
(triangulated independent network). Once the TIN is constructed non-3D data (i.e. the USGS topo raster)
can be “drapped” over the TIN to give it 3D aspect.
The first step is to convert the “contours_ft” to a TIN. We will use the “feet” version because this will
build into the 3D model a vertical enhancement of 3.28 (meters to feet conversion) that will make peaks
and valleys more noticeable. The XY system remains UTM so those units are meters. Use the Figure 2
window as a guide but use “contours_ft” as the input feature class, and the output TIN as “dem_tin_ft”.
This will create the new TIN and add it to the current project. Figure 16 displays the appearance of the
TIN based on “feet” rather than “meters”. At this time exit out of ArcMap.
Now start the ArcScene application and then add the TIN to the project. Figure 16 displays the
appearance of the TIN in ArcScene. If you have not used ArcScene before play around with the
“Navigate” tool to get a feel for how ArcScene can show different 3D perspectives of the topography.
ArcScene can “drape” any 2D raster image over the TIN to give the 2D raster a 3D aspect. Try this with
the Hillshade created from the DEM at this time by adding it to the project. Right-click on the “Hillshade”
feature name in the TOC window, and then select properties. With the “Base Height” tab use the TIN as
elevation control as indicated in Figure 17. Set the TIN as the “custom floating surface” as indicated. The
view should now look similar to Figure 18. You can also add polyline features to the 3D surface using the
same “Base Height” property. Add the “contacts” feature to the current ArcScene project as a polyline
feature class. In the “Properties” menu for the feature set the “Base Height” to the TIN. Do not attempt
to load the symbology theme used in the 2D geologic map project- symbology such as “teeth” on a
thrust fault just do not work in 3D perspectives. Set the “contacts” polyline feature to a standard width
black line (i.e. regular contact). You should wind up with something similar to Figure 19.
Creating and Saving 3D “Fly-Through” of 3D Scenes
ArcScene can create and save as an animation a “fly-through” of the 3D scene. This can be a
tremendously effective demonstration tool at meetings and conferences. In this case we will practice a
“fly-through” along a predefined flight path, and when ready save an animation to turn in as a product
for this assignment.
A feature class named “flightpath” will be made available online- add this polyline feature to the current
project. Using the “base height” property add the 3D aspect to the flight path, but also add 50m extra
height to make sure it is above the 3D surface. Activate the “Animation” controls as depicted in Figure
19. Select the “fly” button and center the tool on the 3D diagram. Left-click to start advancing forward
through the diagram. Successive left-clicks will speed up forward velocity. Right-clicks will decrease
speed. If you right-click one more increment than the left-clicks you will stop and hover. The next leftclick will allow you to re-orient the path by moving the mouse left and right, but it will not advance. In
order to advance the flight, you will need to left-click again.
After practicing the fly-through along the flight path several times, start recording with the animation
controls (see Figure 20). Make sure to save the animation file and then load it and test it. Name it
“flythrough.asa”, and submit it as one of the project products.
Figure 1: Dialog activated by toolbox "Spatial Analyst Tools > Surface > Contour".
Figure 2: Dialog activated by “3D Analyst Tools > Data Management > TIN > Create TIN” .
Figure 3: Base map with TIN and A-A' cross-section line.
Figure 4: Dialog generated by the toolbox "Interpolate Shape" selection.
Figure 5: Zoom-in view of the profile line in edit vertex mode.
Figure 6: Exporting the profile graph data to Excel.
Figure 7: Excel spreadsheet containing the profile graph data with x=offset from “A”, and y=elevation (m).
Figure 8: Dialog activated by the toolbox "Points to Line".
Figure 9: Dialog activated by toolbox " Data Management Tools > Features > Points to Line ".
Figure 10: Appearance of the completed topographic profile.
Figure 11: Layout of geologic map including the profile frame.
Figure 12: Python code for calculating the values in the
"index" field of the contour feature attribute table.
Figure 13: Python code block for calculating the "contlabel" field.
Figure 14: Contours feature class attribute table after executing the calculation queries.
Figure 15: Effect of symbology and labeling settings for the contours feature class.
Figure 16: 3D perspective of TIN in ArcScene.
Figure 17: Setting the TIN as the elevation control surface for the Hillsahde in ArcScene.
Figure 18: Appearance of the Hillshade draped on the TIN in ArcScene.
Figure 19: 3D view with Hillshade and contacts added to project.
Figure 20: 3D view of ArcScene project with flight path added and animation controls active.
Download