In PART 1 of this series of posts, I showed you how to create a surface in Civil 3D from a shapefile that contained contour data. I also showed you some of the issues with using that command. In this post, I’ll show you how an alternative method for creating a surface from a shapefile. There are pros and cons to this method compared with the previous method:
- Allows you to use all the data in the shapefile as needed.
- Gives you control over the weeding and suplementing factors for the surface creation.
- Allows you to use the correct options for minimizing flat areas.
- There are a lot of steps to this process.
- It potentially creates a much larger surface (data wise)
There are a lot of steps to this process so rather then detailing each step like I normally do, I’m going to summarize the steps here and then, if you need more detailed information, you can watch the included video.
- Import the shapefile into a drawing as AutoCAD entities (create object data from the shapefile data).
- Save the file as a new drawing and close it.
- Create a new drawing and attach the drawing with the contours to it via the Map Explorer in the Map Task Pane.
- Query the contours from the old drawing into the new drawing altering the elevations of the polylines to the elevation from the shapefile.
- Create a new surface.
- Add a dataclip boundary to the surface.
- Add the contours to the surface as contour data (make sure you toggle on all four minimize flat area options).
And that’s it! This will create a much better surface from your data but it definitely takes a lot longer to do.
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.
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
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
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.
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
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
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.
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.
Clicking Finish, Civil 3D then creates the surface, adds the data to it, and displays it in your drawing.
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
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.
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.
Apparently, this won’t come as a surprise to those that know AutoCAD Architecture but, we can add any property we want to any object in our drawing!
Example Properties on a Featureline
Turns out, it’s a lot easier then you would think.
First thing to do is run the command PROPERTYDATA and go into the “Sets” command line option. This will open up the “Style Manager” dialog box (no, not Civil 3D styles…).
Once in here, simply right click on Property Set Definition, choose New, and name the new style (I named mine “Featureline Curbs”). On the “Applies To” tab on the right, simply select the type of object you want to create a custom property for (I chose a featureline for this example).
Object Type to Add Properties To
Finally, go to the Definition tab and add your new properties. Click the top button on the right side to create the new property, and then simply fill in the data. I created a new property for a featureline that represents a curb so I know what type of curb it is (defaults to “vertical”).
Create New Property
Settings for the new property
When you select a featureline now and go into the AutoCAD Properties, you’ll be able to see these new properties and edit them independently for each object. There is a trick, however, to be able to see them. On the Extended Data tab of your properties, you’ll need to select the object (or objects) you want these properties to be assigned to and then click on the button at the bottom of the properties, “Add Property Sets”.
Add Property Sets
This will then bring up a dialog box that will allow you to choose the property sets for this (these) object(s). In this example, I only have one but you aren’t limited to just one.
Select Property Sets
Now, when you select that line again, and go to the extended properties in your AutoCAD properties, you’ll see those properties.
Property Sets Dislayed
Now, comes the fun part, figuring out what we can do with this! If you have any ideas, leave a comment below. Keep in mind, I just found out about these and I haven’t really had much time at all to play around with them yet but they’re there so go start using them!