Civil 3D: Using IMG files as DEM Surface Data

Kevin Breslin

Bryant Quinney | Sr Applications Expert

In many states, data is available for large areas in the form of IMG files (essentially a DEM file but differing data format). While Autodesk Civil 3D does not natively handle this type of file, the data would need be converted using one of a couple of options you can find for GDAL usage. I use the OSGeo4W environment (available at, which includes QGIS, GDAL/OGR, GRASS and many other packages. Alternatively, I am told you can use ArcMap to open the files and change the format.

In the setup, since I am most concerned with GDAL, I opted for the Express installation option and left the other packages in place that were already checked. However, if you would like to, check or uncheck any desired choices and proceed with the installation. The disclaimer(s) for this is actually a series of disclaimers, requiring your agreement to the legalese of each package. For other setup instructions and specifics, please refer to

Disclaimer: Install software at your own risk. Please follow documented instructions and pay attention to the links which you click to access downloads. Modifying the path variables of your computer must be done with caution. For what we are trying to achieve here, modifying the environment variables as stated in the links above, is not necessary.

Now that you have the package(s) installed, we can jump right into converting some data to use directly in Civil 3D.

Command Usage

GDAL is a command-line interface that has far more capabilities than what we will cover here (options found in So, in getting going, here are a few notes about the environment.

Command path: “C:\OSGeo4W64\bin\ gdal_translate.exe”

Data source path: “D:\_Class Data Samples\Surface\DEM\Brown County, Texas”

Data destination (output) path: “D:\_Class Data Samples\Surface\DEM\Brown County, Texas\OUTPUT”

Now, the syntax to follow is:


Basically, it is the command, option(s), source dataset, and destination dataset.

Since we are converting file types in this setting, we will use the [-of format] option. Replacing the word ‘format’ with a file type indicator from the following list allows the translator to identify the file type you wish to create.

The file types GDAL will work with are:

02 03

Data Conversion

Now, the command I will need to enter (or copy/paste) into the command-line window, to test my first of many files (using GeoTiff format), is:

gdal_translate -of GTiff "D:\_Class Data Samples\Surface\DEM\Brown County, Texas\stratmap19-1m_3198171a1.img" "D:\_Class Data Samples\Surface\DEM\Brown County, Texas\OUTPUT\stratmap19-1m_3198171a1.tif"

Keep in mind that you will need use quotation marks (“) when the path has spaces in it as mine does (this is common in a DOS setting).If you have input the correct command string, you should see something like this:


As well, you should see a corresponding output file in the destination directory.


Just to check, before using in Civil 3D, upon opening in my default program for that type of file (ERDAS), I see that the translation worked as hoped or expected.


Civil 3D Surface Creation

With the initial image created, I now have a format that Civil 3D will recognize, a GeoTIFF.


When I go to ‘Create Surface from DEM…’ and browse to my output file, select GeoTiff as the file type and select Open, I get the surface I have been looking for.


As with many GeoTiffs, you will notice, in the surface, certain data that was not apparent in the image file. Also, as touched on earlier, there are many other operations that can be done in the GDAL translator. Perhaps I want the color depth or interpolation to be different for possibly overlaying the imagery onto plan sets or exhibits. Using GDAL, you can also change scaling, work with metadata, specify the output file size, and even work with projections.

Combining or Tiling Files

If you are like me and have many other IMG files to convert so you can have one unified surface, you will need to figure out how you want to approach this. The documentation at mentions ‘gdal_merge’ to even combine the output files into one.

A second approach would also be to use the “Add” capability when specifying DEM files to use in the surface definition.


This way you can independently add, and remove, files for usage as needed. Well, there you go! I am off to convert more files, by batch file of course.

Okay, I did not actually go anywhere. My batch file is done and executed. Happy converting!


Previous Video
New iLogic Drawing Snippets for 2021
New iLogic Drawing Snippets for 2021

See the new iLogic drawing snippets available in Autodesk Inventor 2021 and how you can use them to annotat...

Next Article
DACH & ISYBAU Extension Causing Issues in Civil 3D
DACH & ISYBAU Extension Causing Issues in Civil 3D

Issue: You have unusual errors on Civil 3D and/or you notice the command line is showing command or informa...