image image thumb1One 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:

image image thumb2

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

  1. Right-Click on the surface name and select “Export LandXML”
     image image thumb3
  2. Since all we’re interested in is our surface, accept the defaults and press [Ok] to save your XML file.
  3. Create a new drawing (File > New), and select a Metric drawing template (ie. _AutoCAD Civil 3D (Metric) NCS Extended.dwt)
  4. Set the datum of your new DWG file
  1. From the Civil 3D Toolspace select the “Settings” tab.
  2. Right-Click on the DWG name and select “Edit Drawing Settings”
    image image thumb4
  3. Select an appropriate metric coordinate system
    image image thumb5
  • Import your XML surface by going to File > Import > Import LandXML.  Selecting your XML file from the resulting dialog.
    image image thumb6 
  • From the “Prospector” tab of the Civil 3D Toolspace, Right-Click on the surface name and select “Export to DEM”
    image image thumb7
  • Generally speaking you can accept the defaults from the resulting “Export Surface to DEM” dialog.  One setting you may experiment with is the “Grid spacing”; the larger the number the less accurate your DEM.  Aside from that, simply specify an output file name and press [Ok]. image image thumb8
  • 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