Creating a Civil 3D surface from an Esri ASCII raster

Esri ASCII raster files (*.asc) are commonly used to store digital terrain models, such as LiDAR data. In the following lines, we will explain how the information is arranged in this file format and we will describe a workflow to create a Civil 3D surface from an ASC file.

In the context of digital terrain models, an esri ASCII raster file contains the elevation of a number of square cells that form a grid. If you open it using a text editor, such as notepad, you can see the data that makes up the file. It starts with a header that defines the properties of the grid followed by the data, with the elevation of the grid cells separated by spaces.

The following is a list of the parameters that are part of the header:

    • ncols: number of cell columns.
    • nrows: number of cell rows.
    • xllcorner or xllcenter: x coordinate of the lower left corner (or centre) of the origin cell, located in the lower left corner of the grid.
    • yllcorner or yllcenter: y coordinate of the lower left corner (or centre) of the origin cell, located in the lower left corner of the grid.
    • cellsize: size of each of the square cells.
    • NODATA_value: value that designates that no data exists for a particular cell. This parameter is optional and may not exist.

The data that follows is a list of elevations, separated by spaces, sorted from top to bottom and left to right. That is, the first value is the elevation of the upper left cell, followed by the elevation of the second leftmost cell from the top row and so on. Typically, the values are arranged in separate lines corresponding to the different rows, with the first line representing the row at the top of the raster. However, carriage returns are not necessary at the end of each row as the number of columns determines when the next row begins.

Raster grid

The following two examples show the same raster grid, using the coordinates of the corner or the centre of the origin cell.

 

Checking coordinate systems

Before creating a surface from an ASC file in Civil 3D, we need to check that the coordinate system is set correctly. It can be set from ‘Edit Drawing Settings…’, as shown below.

 

 

Creating a new surface

We then start by creating a new surface.

For points that lie in a regular grid, it is advised to use a grid surface rather than a TIN or triangulation surface. A grid surface will require less disk space than a TIN surface, leading to quicker load times, especially if the number of points is high.

Grid X-spacing and grid Y-spacing should be set to the ‘cellsize’ parameter from the header of the ASC file.

Adding a DEM file

From prospector, look for the surface and add the DEM file from the ‘Definition’ branch.

Browse to the ASC file and set ‘Use custom null elevation’ to ‘Yes’ if the ‘NODATA_value’ parameter is part of the header in the ASC file. In that case, ‘Null elevation’ should be set to the ‘NODATA_value’ parameter. If that number is found in the file, it will be ignored and no point will be created for that particular grid cell.

If you don’t use a custom null elevation, it will create a point at that level (-9999m in our example), which is incorrect.

Civil 3D Surface

After confirming the previous dialog, the surface will be generated.

A point will be created at the centre of each grid cell. In the image below, the grid from the ASC file is shown in cyan, the boundary of the surface in red, and the surface triangles in white. The coordinates and levels that have been labelled can be found in the example files that we showed at the start of the article.


Sovelia Vault: The Smarter Way to Manage Design Data

04 November 2025

If you are an Autodesk Vault user in the mechanical engineering and manufacturing industry, you are likely familiar with the challenges of managing design data. While Vault provides a solid foundation for storing and organising design data, it falls short in some critical areas. You might have noticed this if you ever wanted to automate workflows or configure company-specific rules and processes in Vault. Let’s dive into these challenges and possible solutions. 

5 Tips to Work Smarter in Autodesk Vault

03 November 2025

Sovelia Vault is an automation platform for Autodesk Vault, providing enhanced flexibility, control, and customisation. Discover 5 tips to work smarter and streamline your Autodesk Vault workflows with Sovelia Vault.

Cybersecurity Starts with Awareness

27 October 2025

Discover the hidden cybersecurity risks many businesses overlook—from improper data disposal and insecure API integrations to forgotten digital footprints left by former employees. Learn practical steps to reduce your exposure and protect sensitive data. Plus, get expert insights and register for our upcoming webinar on data security and compliance in Autodesk’s new regional hubs.