Creating a DEM with Civil 3D
One of my users called me the other day asking if there was any way to convert our DTM surface into a DEM surface, as a client had called them asking if it was possible. The short answer to the question was yes, but let me review the fundamental differences in these formats before getting into the how-to of this task. Both formats exist for the same fundamental reason – to capture a representation of the earth’s surface. What differs is the way each stores that data.
Format Differences
A DEM or Digital Elevation Model stores this information using a predefined grid of squares. Thus imagine a piece of graph paper; at each point two graph lines intersect, an elevation will be assigned. This format is an effective way of representing surfaces, but due to it’s rigid nature isn’t necessarily the best choice for civil engineering design. And it is with that we have our second format – DTM or Digital Terrain Model. Unlike a DEM, a DTM captures a surface through the use of a triangular irregular network.
In essence, rather than using squares to capture a surface, a DTM uses triangles. At the corner of each respective triangle, an X, Y, & Z elevation is captured and stored. Since the triangular network is irregular, the TIN is generally better at capturing things like flow lines.
Overcoming Format Limitations
Although Civil 3D’s native modeling format is DTM, it does have the ability to export a surface to a DEM file. In addition to the architectural differences between DEM and DTM surfaces, the DEM format only accepts metric coordinate systems. International users don’t necessarily have to worry about this detail, but those using imperial coordinate systems will need to convert their surface to a metric coordinate system.
As we’ll see later the “Export to DEM” command within Civil 3D lists both the source coordinate system, and the coordinate system to the to-be-exported DEM. Generally speaking whenever Civil 3D lists both an input and output coordinate system, you can assume Civil 3D will do the heavy lifting of converting from one system to another. Unfortunately the “Export to DEM” command is an exception to that rule. As stated in the Civil 3D help file:
With that said we’ll have to perform the coordinate conversion manually. For purposes of this post I am going to use the LandXML format as a carrier to convert from one coordinate system to another.
Conversion Procedure
- Right-Click on the surface name and select “Export LandXML”
- Since all we’re interested in is our surface, accept the defaults and press [Ok] to save your XML file.
- Create a new drawing (File > New), and select a Metric drawing template (ie. _AutoCAD Civil 3D (Metric) NCS Extended.dwt)
- Set the datum of your new DWG file
- From the Civil 3D Toolspace select the “Settings” tab.
- Right-Click on the DWG name and select “Edit Drawing Settings”
- Select an appropriate metric coordinate system
Read more about using AutoCAD Map 3D to analyze DEM surfaces in my September / October 2007 AUGIWorld Article “Finding the 3D in Map 3D: Surface Visualization”
The CAD Geek is something I do in my spare time, oftentimes late at night. Help me stay awake and keep blogging by buying me some coffee. (Suggested: $3.00 for a Tall, $5.00 for a Venti)Popularity: 45% [?]
Hey Donnie, nice blog.
I’m not finding anything in the DEM file specification that says it must be in a metric coordinate system. The early USGS DEMs were in UTM, which is metric by definition, yet the USGS spec allowed imperial units for elevation. Meanwhile, newer DEMs, non-US (at least Canadian that I have experience with) are gridded on lat/long, which is definitely not metric.
Meanwhile, there is no mathematical reason for a DEM to need any given system.
The tricky part, and the reason you need to convert to the desired coordinate system BEFORE you output to DEM (and why you can’t read from DEM to a grid surface with translation) is that a square, when transformed into another coordinate projection, is no longer a square! Sometimes it may appear so out to a number of decimal places, but mathematically it ain’t so.
Especially for lat-long - in my latitude (Anchorage, Alaska) lat/long DEMs project out no something closer to 2x rectangles in UTM or State Plane.
@Earl - Since I almost always work in State Plane Foot coordinates, it seems I may have mispoken on the metric thing. In this case I was working in State Plane Foot, and the only coordinate system accepted was the State Plane Metric. In any case I do appreciate your detailed comment. Here in Virginia the coordinate shift isn’t as drastic as it seems to be there in Alaska. Thanks again!
Donnie
I saw your blog on creating a dem file from tin surfaces in Civil 3D. I have a question: is it possible to select multiple surfaces in order to create one dem file? If you know of a way please educate me on this matter. I am rushing of course with work material and this is where I am holding up. Any help would be much appreciated.
Thank You,
Kristina Mohos
Staff Geologist / CAD Drafter
Genterra Consultants, Inc.
15375 Barranca Parkway, Suite K-102
Irvine, CA 92618
(949) 753-8766 or (818)261-0346