So, you have an ESRI Shapfile with contour data in it and you want to create a surface from it. How is this done? Well, honestly, it really isn’t too terribly hard. There are, however, some gotchas you have to be aware of when using the easy method. Part 2 in this series will cover a more involved way of accomplishing this but will give you a much better surface.

Creating Surface

First off, displaying the contours in your drawing, this part is super easy. Simply drag your .shp file from Windows Explorer into you drawing area and it will connect to the .shp file and display it’s contents.

Importing a Shapefile

Importing a Shapefile

This part isn’t necessary but it is a nice way to compare the surface you get from the data you have.

Now, let’s actually create the surface. On the home tab of the Civil 3D Workspace on the ribbon, expand out the Surfaces pulldown and choose “Create Surface from GIS Data”.

Create Surface from GIS Data

Create Surface from GIS Data

This will open up another of the famous Civil 3D Wizards. The first tab allows you to set the properties of your new surface, such as the name, description, style, etc. I recommend not using a style that displays a lot of data. Typically, GIS files have a TON of data in them! You don’t want to unnecessarily overtax your system.

Object Options

Object Options

On the next tab, Connect to Data, you’ll choose the type of data you want to connect to and then the actual data source. Depending on the data type, options within the dialog will become available. In this example, I’m connecting to a shapefile so I choose that option and then browse to the file. Don’t forget to click on the Login button at the bottom (not sure why you need to login to a shapefile but you do).

Connect to Data

Connect to Data

the Schema and Coordinates section simply allows you to choose the data you want to bring in and assign it a coordinate system (if it doesn’t already have one). In this case, I simply toggled on the only data that was available. If you are using something other then a shapefile, you might have additional options here.

Schema and Coordinates

Schema and Coordinates

The Geospatial Query section allows you to choose the area of the data source that you want to create the surface from. In most cases, you don’t want to create a surface from the entire shapefile as that is just overkill. Choose the method you want to select the area and then define the area (it’s pretty straight forward). At the bottom of the dialog, you’ll see two options, Inside and Crossing. In most cases, I’ve found the Crossing option to work better. If you choose Inside, it will only select the objects that are completely inside the area of interest and ignore any that extend beyond it. Since most contours are very long, they’ll extend beyond your boundary and they won’t be selected so make sure to choose the Crossing option.

Geospatial Query

Geospatial Query

Finally, the Data Mapping section. This if one of the most important parts of the dialog. A shapefile is 2d file. This means the lines within the shapefile only have X,Y values, no Z values. The elevation of the contours are then assigned to the objects as a data field. You’ll need to tell Civil 3D which field within the shapefile represents the elevations of the contours.

Data Mapping

Data Mapping

Clicking Finish, Civil 3D then creates the surface, adds the data to it, and displays it in your drawing.

Surface Created

Surface Created

Surface Issues

Now that the surface is created, you should be aware of some issues with creating a surface using this method. First thing, not all the points from your contours are used in creating the surface. There is an automatic weeding being applied to the data that you have no ability to control.

Data Points Weeded Out

Data Points Weeded Out

Whenever you have a surface created from contour data, there is the possibility that flat areas can be created. Civil 3D has the ability to minimize these flat areas. When creating a surface from a shapefile, Civil 3D automatically applies the Minimize Flat Areas edit to your surface but, you can change the settings in this command. Add the problem, you can’t go back and change the settings later, remove the edit to add it back in, or do anything with it. You are stuck with it the way it is. See THIS post for information about the flat areas and what you settings you should use. When creating a surface from a shapefile, the “Swap Edges” option is not used and therefore, creates a less then desirable surface.

Missing Contours

Missing Contours

Ok, so the contours aren’t really missing, they should just follow the data better. In other words, there should be contours in the areas that I’ve pointed out in the image.

For an alternative method of creating the surface from a shapefile, stay tuned for Part 2.