GIS to CAD in Civil 3D

April 26th, 2012

As you may know, AutoCAD® Civil 3D® is wrapped around a powerful GIS tool called Map 3D.  This tool enables us to analyze GIS data intelligently in its native format without having to seek out additional software.   Because most of us who use Civil 3D are in the land development business, we tend to focus on the land development tools.  However, now we are finding GIS data everywhere.  So how do we extract meaningful features from geodatabases for CAD use with Civil 3D?  We do so by embracing our Map Task Pane.

Connecting AutoCAD Map to GIS Data 

  1. Set the workspace to Planning and Analysis.  Set the annotation scale.
  2. At the command line, open up the Map Task Pane:  Type mapwspace>(enter)>(enter).
  3. On the Display Manager tab of the Task Pane, open the Data Connect palette:  Click on Data>Connect to Data.
  4. On the Data Connect palette, connect to the folder containing the ESRI SHP files. In the left pane, click on Add SHP Connection.  In the right pane, click on the folder button and browse to the location of the SHP file collection.  Click on the Connect button.
  5. On the Data Connect palette, add all schemas to map.  Click Add to Map.  Close Data Connect palette and zoom extents.

We’ve just established a live connection to our GIS data.  These are not yet AutoCAD entities, but they are MAPBULFEATURES or representations of the connected GIS data.  It’s important to understand that GIS data consists of points, lines, and polygons.  The circular representations are points; the linear representations are lines; and the shaded shapes are polygons.  Before we create AutoCAD entities, we want to change the appearance of these features to look more like the AutoCAD entities we are seeking.  To do so, we will modify the Map styles that have been applied.  Each of these feature types have been placed into a geospatial layer.  Geospatial layers, like AutoCAD layers, serve to contain and organize data.  However, geospatial layers relate to the GIS feature classes, which possess the attribute tables.  A point layer could contain water valves, telephone manholes, or drainage inlets.  A line layer could contain utility lines, roadway centerlines, or edges of pavement.  Polygon layers could represent parcels or buildings.

Adding Style to your Geospatial Layers

1. Blocks can be associated with points in a geospatial point layer.  The block can be imported into your current drawing. 

a. On the Display Manager, select the layer and open the Style Editor.



b. Click Load to select a symbol from a template drawing.

c. Browse to the location of the drawing containing the symbols.  Select the symbol to be associated to the layer.  Click Open.

d. The last step is to scale the symbol.  We do this by configuring size context.  Configuring by Device context is scaling to the screen so that when zooming in and out, the symbol scales consistently with the screen.  Configuring by Map context is scaling using map units so that when zooming in and out, the symbol stays scaled according to precise map units.  Using Map context with a width value that relates well to the annotation scale is the way to go.  If Lock aspect ratio is checked, the height value takes care of itself.

2. For polygon layers, clear the fill out of the polygons by opening up the Style Editor for that layer and remove the fill.

3. To create annotation from data in the attribute tables, open the style editor for the layer and configure a feature label.  This can be done for points, lines, and polygon features.



4. Export to DWG as indicated in the illustration below.

This will create a drawing containing the GIS elements using native AutoCAD entities instead of map features.  The GIS layers will translate to AutoCAD layers.  Symbols, lines, and polygons will be exported using color and scale overrides.  Using some handy AutoCAD tools, these minor inconveniences can be alleviated. 

DWG Tweaks

Create a new drawing.  Use a template that contains desirable text styles and the blocks used in the drawing containing the GIS extraction.  The Save Current Map to DWG command placed color overrides inside the block definition.  Creating a new drawing with the original block definitions allows us to insert and explode the GIS extraction maintaining the original block definitions.  In this example, we’re using annotative block definitions and text styles.

1. Insert the GIS extraction file and explode.



2. To correct the size of the blocks:

a. Open the Properties palette then open Quick Select.  Select all blocks in the drawing based on the following parameters, then click OK.



b. In the properties palette, change Annotative Scale to the current scale and Scale X to 1 (Y and Z should change automatically).  Clear the selection (Esc-Esc).

3. To correct the properties of the text:

a. In the Properties palette, open Quick Select.  Select all text in the drawing based on the following parameters, then click OK.



b. In the Properties palette,  change properties to your preferences.

General

Color Bylayer

Text

Style– Simplex
Annotative –Yes
Paper Text Height – .1
Width Factor – .8
Obliquing – 15

c. Clear the selection (Esc-Esc).

4. To remove all color and linetype overrides, select all entities and configure the Properties palette.

5. Finally, open the AutoCAD Layer Translator.  This can be done by typing LAYTRANS at the command line.  The Layer Translator allows us to load AutoCAD layers from our standard drawing template and map them to the AutoCAD layers in the current drawing.  The AutoCAD layers in our current drawing bear the names of the geospatial layers from the geodatabase.  Using Layer Translator, not only are we renaming the layers, but we’re changing the layer properties to those configured in our standard drawing template.  

These layer mappings can be saved and used on other similar GIS extractions.

To Sum Up

In a few easy steps, we extracted map features from a geodatabase and created a CAD base file with one single program.  In addition to extracting GIS data, we can build GIS models and run inquiries, analyses, and queries.  We can export GIS models to other data formats such as SHP, SDF, and other FDO connections.  There’s a lot packed into Civil 3D that makes it a most powerful land development tool to have around the office.


Cyndy Davenport began inthe indusry cutting her teeth on roadway projects, site plans, subdiviisons, and Federal open-end contracts. Cyndy transitioned into IT/CAD managment, functioning as a mentor and support resource for firms in the Virginia Beach/Norfolk area for 17 years. She spent 6 years working for one of the largest resellers/solution providers in North America, providing implementation services nationwide as Project Manager of Infrastructure Solutions. After relocating to the Washington, DC area, she is now with Bowman Consulting Group as their Design Systems implementation Manager, implementing Civil 3D throughout 14 offices. She often writres on her blog, Fierce Solutions (http://c3dcougar.typepad.com) and maintains a professional presence on Twitter.

Join AUGI Today

Become part of the largest Autodesk community


About the Authors

Marilyn Law

 

Appears in these Categories