UNIT 23:CREATING MAPS WITH CAD

Written by John Schaeffer, Central Oregon Community College


Context

CAD (Computer-Aided Drafting) and CAM (Computer-Aided Mapping) are software programs designed to efficiently and very accurately create the graphic entities needed in the production of maps. In this way they can be confused with GIS, but there are several important distinctions between CAD and GIS. While CAD programs cannot perform the analysis expected of GIS, CAD-generated maps and data often provide the basis for GIS data, especially in applications such as parcel and street mapping. CAD can also be used effectively to edit graphic data, often more effectively than GIS programs where the ability to manipulate graphic entities is secondary to analysis.

With the large amount of map data being produced in CAD programs, it is important for GIS technicians to be comfortable with how CAD can be used and how CAD data can be converted for use with GIS.

Unit Concepts

  1. Differences between CAD and GIS

  2. Registering CAD Data

  3. How CAD entities relate to GIS features

  4. CAD drawing organization and structure

  5. CAD to GIS conversion

Differences between CAD and GIS:

Before understanding how CAD can be used with GIS, it is necessary to understand the differences between CAD and GIS. In this discussion the author will make reference to AutoCAD, produced by AutoDesk, one of the most common desktop CAD packages, and ArcView, ArcCAD, and ARC/INFO GIS packages from ESRI. However, most functions should be found in all commonly used CAD and GIS packages. The key difference to keep in mind is that CAD is designed to create and edit graphic entities, while GIS is a spatial database that uses graphics to display the results of analysis.

One significant difference is that CAD software generally does not create topology. Topology is the ability to determine connectivity, adjacency and other spatial relations between entities. Even when CAD is used to connect lines "endpoint-to-endpoint" the connection is not stored as part of a network. If a series of lines are connected to form a closed polygon, the CAD program only recognizes this as a polygon under special circumstances; and cannot recognize that a point within that polygon is related to that polygon, or that this polygon may share lines with adjacent polygons. Lacking topology, spatial analysis is very limited .

A second difference is that while CAD systems are capable of using geo-referenced coordinates such as UTM or State Plane systems, many CAD drawings may instead use Cartesian coordinates with an arbitrary starting point. Usually these drawings or maps can be scaled, moved, and/or rotated into a geo-referenced coordinate system. Also, until recently many CAD systems did not have the capability of changing projection systems.

A third critical difference is the capability of linking attribute data to graphic entities. CAD entities can have data attached indirectly, such as layer names, color, width, length, and in some cases attribute and text information can be attached to point entities. However, this data is not readily available in a tabular format within the CAD program. But a GIS system is designed to directly link each graphic entity with a record in a data table, and in a GIS, the data table is more important than the graphic.

A third critical difference is the capability of linking attribute data to graphic entities. CAD entities can have data attached indirectly, such as layer names, color, width, length, and in some cases attribute and text information can be attached to point entities. However, this data is not readily available in a tabular format within the CAD program. But a GIS system is designed to directly link each graphic entity with a record in a data table, and in a GIS, the data table is more important than the graphic.

There are also several minor differences between CAD and GIS. One is that CAD systems work at an engineering level of accuracy (double precision), while some GIS systems use a mapping level of accuracy (single precision). CAD systems can use a variety of unit types, such as Architectural (feet and inches), Engineering (decimal feet), or fractional, while most GIS systems use decimal units. These differences usually don't cause difficulties as long as the user is aware of them. Another difference is in file structure; usually a CAD drawing is contained in one file, but a GIS "map" is usually contained in one or more subdirectories with multiple files. For beginning students, it can be difficult to understand that when working with a GIS, multiple data files are being created and that what is displayed on the screen is usually just a temporary representation of the GIS database, sometimes drawn from multiple file sources.

Registering CAD Data:

CAD programs can be used to digitize maps from paper maps or "on-screen" from scanned images. Digitizing set-up in a CAD program follows the same principles as in GIS systems for establishing registration tics. Once digitizing is begun in a CAD system, the operator needs to pay attention to layer organization (see next section) and using CAD tools such as Snap to ensure correct topology.

There are also several minor differences between CAD and GIS. One is that CAD systems work at an engineering level of accuracy (double precision), while some GIS systems use a mapping level of accuracy (single precision). CAD systems can use a variety of unit types, such as Architectural (feet and inches), Engineering (decimal feet), or fractional, while most GIS systems use decimal units. These differences usually don't cause difficulties as long as the user is aware of them. Another difference is in file structure; usually a CAD drawing is contained in one file, but a GIS "map" is usually contained in one or more subdirectories with multiple files. For beginning students, it can be difficult to understand that when working with a GIS, multiple data files are being created and that what is displayed on the screen is usually just a temporary representation of the GIS database, sometimes drawn from multiple file sources.

With existing CAD drawings that are not geo-referenced, it is often possible to bring them into a geo-referenced coordinate system. If a drawing was created in engineering units (feet and inches) it can be scaled to decimal units, with the scaling base point at 0,0. If a drawing is produced in a Cartesian coordinate system, but there is a known geo-referenced coordinate for an identifiable point within the drawing, the drawing can be moved by selecting the identifiable drawing point as the base point and using the geo-referenced coordinates as the "to" point. For example, a common practice in CAD is to create a subdivision map inengineering units using Cartesian coordinates tied to a section corner, with arbitrary coordinates of 0,0. To register this map, just apply the appropriate scaling to scale from engineering units, and then move the entire drawing using the section corner as a base point, to the coordinates used in the geo-referenced coordinates for that section corner.

For drawings covering a large geographic area, it may not be possible to maintain accuracy for the entire drawing when moving the drawing with just one known point. While the base point used in the move may be accurate, entities at the extremes may be inaccurate. If two points are known, it may be possible to get acceptable results using a rotation command.

If there is still distortion, then you will need to apply transformation or rubber-sheeting functions that use multiple points. Not all CAD systems have this capability, and in some cases, the data will need to be brought into a GIS to complete the drawing registraton.

How CAD entities relate to GIS features:

There are two keys to successfully converting CAD drawings to GIS coverages. The first is understanding the relation between CAD entities and GIS feature types. In a CAD system there are many types of entities, some of which appear to be quite similar, but that can be very different in use and properties. However, with GIS, we generally class features as point, line, or polygon features. Understanding how an entity in the CAD program will be treated by the GIS program is critical to successfully using CAD data in a GIS.

One CAD entity that needs further explanation is the AutoCAD "Block" entity. A Block can have many sub-entities that can be scaled upon insertion but the Block is treated as a single point entity with an insertion point. Data attributes can also be attached to this block. For example, a tree symbol could be made of curved polylines with a diameter of 10 units and data attributes for the tree's species and crown width could be attached. When the block is inserted into a drawing, the operator could fill in the data for crown width and species and the symbol could be scaled based on crown width. This attribute data could then be brought into a GIS.

The table below illustrates the relation between geographic features, AutoCAD entities, Database contents and GIS features. While this table specifically references AutoCAD and ArcCAD, other CAD and GIS programs will have similar entity and feature types.

Geographic Representation AutoCAD Entities Database Contents ArcCAD or GIS Feature Type
Point













Point


Text



Block(insert)






(x,y) coordinates
for location

Text can contain
one line of
attribute data;

Block entities
can contain
multiple
attributes; can
also contain
scale and angle
information
Point Theme
Tic Theme for registration
marks;
Annotation Theme for
non-data labeling.


A Point Attribute Table
(PAT) is created
in the coverage.




Line














Arc

Circle

Line

Polyline

Polygon

Solid

3Dface


Nodes--(x,y)
coordinates of
start and end
points; or
change in value
of line.



Vertices--change
in direction of a
line. This is
similar to
vertexes in
AutoCAD polylines.
Line Theme;



An Arc Attribute Table
(AAT) is created in the
coverage.



arcCAD will also create a
line theme as part of a
polygon coverage when using
DDfeat.

Area--Boundary
















Arc*

Circle

Closed Lines
Polygon

Closed
Polyline

Donut

Ellipse

Solid

3Dface
(x,y) coordinates
of perimeter
features;





Polygon Arc List
(PAL)







Polygon Theme;



A Polygon Attribute Table
(PAT) is created in the
coverage. Edits to boundary
entities must be made to the
AAT.








Area--Label
Point






Point

Block

Block
Attributes

Text
(x,y) of insertion
point--used as
location for
display of
attribute values



Text value is saved in
Acad_Text Item; Attributes
are saved in Items using the
tag name as the Item name.





CAD drawing organization and structure:

The second key to using CAD data with GIS is how the CAD data is organized thematically. AutoCAD uses "layers" for this purpose, another term used by other CAD programs is "level". In CAD programs, layers are mostly used to control the display of entities, by defining colors and linetypes for different types of objects and by being able to turn the display of layers on or off as desired. But a layer in CAD is also similar to a GIS layer, in that all the data on that layer is usually the same class or type of data. For example, all line entities that are used to draw roads could be on a layer called "Roads." Or the lines could be further divided into classes by putting them on layers named "Roads_Arterial," "Roads_Collector," or "Roads_Local."

Since most GIS programs can link the layer name of an entity to that feature's record in the GIS database, the layer name can be used as an attribute in GIS. Having the CAD drawing well organized with logical layer names and feature classes greatly increases the ease and functionality of converting CAD data to GIS data.

CAD to GIS conversion: Directly reading data; DXF translation; Hybrid CAD/GIS programs.

There are three general methods of using CAD data with GIS programs. The first is using GIS programs that can read CAD data directly, such as ArcView's CAD Reader extension. The second method is using translation routines usually based on Drawing Exchange Format (DXF) files. The last method is to use a program that works within CAD to create topology and link attributes to spatial features. Examples of this are ArcCAD from ESRI and AutoCAD MAP2 from AutoDesk.

ArcView is capable of reading AutoCAD .Dwg and .Dxf files, as well as Microstation .DGN files. ArcView divides drawing entities into line, point, polygon and annotation features and will extract several properties from each entity such as color, layer name and entity type. ArcView will also extract the data attributes from Blocks. In some cases ArcView will construct rudimentary topology for the features, such as adjacency, but it doesn't recognize point entities within polygons as label-points. Once the CAD entities are brought into ArcView it is possible to do further operations such as querying and limited spatial overlays. Some operations will only work after the drawing themes are converted to ArcView shapefiles. Also, by converting the drawing themes to ArcView shapefiles, the data can then be brought into ARC/INFO using the Shapein command.

Drawing Exchange Format (DXF) is a file format established by AutoCAD that is used as a translator between different CAD programs. Because AutoCAD is widely used this has become the defacto standard, with most CAD, GIS, and GPS software packages being able to read and write to this format. As with all translators, there is occasionally some loss of information between programs and this can sometimes cause problems.

A hybrid CAD/GIS program usually overlays GIS functions on the CAD program, giving users the best of both worlds. For example, ESRI's ArcCAD program works within the AutoCAD interface, so that all of AutoCAD's graphic creation, editing and display functions are available while providing most of the topology, query, and analysis functions of ARC/INFO in AutoCAD style menus and dialogue boxes. Because AutoCAD is easy to customize, providing many customization tools, this means most ArcCAD functions can be customized for better productivity. GIS coverages created in ArcCAD can be exported in "E00" format for use in ARC/INFO or other programs that can read the E00 files; or as ArcView Shapefiles, or they can be read directly by ArcView. New features created as a result of ArcCAD operations such as Buffer, can be displayed as AutoCAD entities and thus used with regular AutoCAD drawings by users who don't have ArcCAD.

In general, a hybrid CAD/GIS program such as ArcCAD is the most efficient way of bringing CAD data into a GIS, since you have CAD and GIS functions available in the same program. This allows the operator to correct problems resulting from CAD errors using CAD tools and to check topology and correct GIS data problems within the same program. The other two methods might require some "back-and-forth" work between the CAD and GIS programs to produce GIS data in a useable form, and in some cases the user might not be able to get the exact results required. But in most cases the transition from CAD to GIS will be smooth, especially if the CAD drawing is created correctly in the appropriate coordinate system, is well organized using layers, and if the relationship between CAD entities and GIS features of the respective programs is understood.


Example Application

Following are three example exercises covering the methods discussed above. An ideal lab exercise for students would be to apply all three methods to the same CAD data and compare the results.

Example 1:

Reading CAD entities directly in a GIS.

This is based on using an AutoCAD Release 13 drawing in ArcView 3.0 using the CAD Reader extension.

Create a simple drawing similar to the image above of a parcel map with owner names and waterlines running to the parcels. This will give you the basic GIS feature types --point, line, polygon -- and allow you to test some topology such as the names being points within a polygon and the waterlines intersecting with the parcels.

Create the parcels with a variety of entities--for example in AutoCAD you could use 4 connected lines; or a four segment closed polyline; or a rectangle, which is a closed polygon. For the owner names use text for some of the names and use attribute blocks for the other names. The waterlines could be created using lines or polylines. Make sure the parcels, owner names, and waterlines are on separate layers.

Open ArcView and with the project window active select File>Extensions...>Cad Reader. Then open a view and add the CAD drawing as separate themes for point, line, polygon and text. Display each theme in turn to see what data is displayed in the view. Also open each theme's attribute table to see what data ArcView stores for each feature.

Perform some queries on the themes. Can you make a separate theme for the waterlines by querying on the line theme? Can you do an intersection (query by theme) of the waterlines with the parcels? Can you do a spatial join on the owner names and parcels? (ArcView allows you to join point themes with polygon themes by doing a join on the shape field. This attaches the attributes of the polygon to each point within that polygon.)

After experimenting with the ArcView themes, determine which AutoCAD entities can be used effectively in ArcView. Then go back to the AutoCAD drawing and make any changes in entity types. Using the right AutoCAD entities, it should be possible to create a parcel map, and then within ArcView, use a spatial join to attach the parcel data to the owner names so that you can do a query of parcels by owner and also do an intersection between the waterlines and parcels.

Example 2:

Using DXF to convert CAD entities to GIS features.

Use the same drawing that was used in example 1 and export this to a DXF file. Then use your GIS systems "import DXF" command or option to see how the entities are treated in the GIS system. Also see what types of queries and operations can be performed.

In ARC/INFO, there are three commands to use with DXF files. DXF followed by the file name will display the dxf entities. DXFINFO will display information about the DXF file, such as layer names. DXFARC will import the dxf file and prompt the user for which layers to import and what type of features should be created from these entities. After the entities are brought into ARC/INFO, topology will need to be created.

ARC/INFO can convert blocks as "inserts" which then become point features. These point features can be used as labelpoints for constructing polygon topology,but the attribute values associated with the block are not brought into ARC/INFO.

However, ARC/INFO does store each insert's "Handle," which is a unique identifier AutoCAD creates for each entity, in the <cover>.xcode file, along with an internal id number. First, the .xcode file can then be joined to the .PAT based on the internal ID. Then, within AutoCAD, extract the block's attributes including it's handle, to a comma delimited file. Add another comma delimited line at the top of this file to create the field headers with "DXF-HANDLE" as the field name for the handle field and appropriate names for the attribute fields. Next, convert this file into a dBase format using Excel or a database program and use the ARC/INFO DBASEINFO command to covert this to an Info file. Lastly, do another join to the .PAT using DXF-HANDLE as the relate item.

Example 3:

Creating a soils coverage with attribute tags for soiltype and drainage.

This exercise will create a polygon coverage from CAD lines and points. A common GIS function is to link a labelpoint with a polygon when creating topology. This labelpoint is often used as a unique identifier for the polygon, but it can also have one or more attributes attached. This exercise was originally written for AutoCAD R13 and ArcCAD 11.4. I've made most AutoCAD operations generic so they could apply equally to any CAD program, but the specific ArcCAD commands have been left in the exercise. If you would like the complete set of exercises and files contact the author at jschaeffer@cocc.edu or jms@bendnet.com. The exercise requires a drawing with several polygons, which can be created from individual lines, including shared lines. If desired, the polygons can have some intentional errors such as overshooots or undershoots so students get experience in dealing with these errors. For the labelpoint, this exercise uses an AutoCAD "Block", which is a special type of point entity that can contain multiple attributes. Text could also be used as the labelpoint.

Step 1:

Create a Wblock or a block named "Soiltag" with attributes for "soiltype" and "drainage" with no default values and with appropriate prompts.

Step 2:

Isolate the "soils" layer and check the soil polygons for overshoots or undershoots and any areas that don't close. If there are errors, they can be corrected now, or they can be corrected using the GIS program. On a simple drawing like this it's easy enough to find and correct the errors, but in a larger drawing it might be more efficient to let the GIS program locate errors.

Step 3:

Make a layer called "Soilatts", and insert the soiltag block into each polygon using values like "gravel", "loam," "sand," for "soiltype" attributes and "good," "fair," "poor," for "drainage" attributes.

GIS operations:

Step 4:

Use DDfeat (creates GIS features) to create a polygon theme called"Soils", choose "clean," select "layer" property, and the "soiltype" and "drainage" attributes. Make both attributes character items with enough spaces to fit your largest attribute value. When prompted to select entities be sure to select all the lines creating the soils polygons and the attribute blocks. DDfeat will also create a line theme tied to the same dataset, just accept this when the warning box comes up. This operation in ArcCAD performs several steps--creating a theme, converting entities to features and adding these to the feature attribute table, creating topology, and linking attribute data to each record--that results in a co mplete GIS coverage.

Step 5:

Use Ddbrowse (database browse) to check that the theme was created and that the data looks generally correct. You should see values in the "soiltype" and "drainage" items, but you might have a different number of polygons, depending on what errors might have been in the drawing.

Step 6:

Use Laberror (label error) and Noderror(node error) in the Topology menu to check topology. Use AutoCAD commands (Trim/Extend, Grips, Pedit) to correct entities as needed. The amount of topology errors will depend on how well the CAD drawing was constructed. If the drawing is checked for correct connections on all intersections, there should be no errors and the next step can be skipped. If there are problems, and especially if the drawing has many entities, it might be necessary to repeat steps 6 and 7 more than once until you have a coverage without node or label errors.

Step 7:

Use Modfeat (modify feature) to save the modifications to the coverage or Kill(deletes theme and coverage) the original coverage and recreate the coverage from the corrected entities using DDfeat.

The user should now have to a complete soils coverage that can be used with other coverages for analysis, can be used with ArcView directly, or exported to another GIS.


Learning Outcomes

The following list describes the expected skills which students should master for each level of training, i.e. Awareness/Competency/Mastery.

Awareness:

The expected learning goals of this section are to achieve a general understanding of the differences between CAD and GIS, and how CAD can be best organized for conversion to GIS.

Competency:

The learning goals of this section are to develop the ability to perform basic conversions from CAD to GIS, and to be able to manipulate CAD entities to create successful conversions.

Mastery:

The learning goals of this section are to be able to work successfully with a variety of systems and methods to manipulate CAD data and then be able to determine the most appropriate methods of converting that data to a GIS.


Preparatory Units

Complementary:

Unit 9 - Convert digital spatial data between formats, systems, and software
Unit 10 - Projecting data
Unit 11 - Register and conflate data
Unit 13 - Digitize maps
Unit 24 - Using GPS data


Awareness


Learning Objectives:

Student can define basic vocabulary relating to using CAD data with a GIS.

Student can explain the types of entities used in a CAD system and relate these to the types of features used in a GIS.

Student can explain the types of operations that can be used to perform CAD to GIS conversions.

Vocabulary:

Entity type (CAD)
Point
Text
Block
Line
Polyline
Arc
Circle
Polygon
Rectangle
Feature type (GIS)
Point
Line
Polygon
Attribute
Layer
Coordinates
Geo-referenced
Cartesian
Topology
DXF


Competency


Learning Objectives:--student can perform the functions below using software that he/she is already familiar with. This assumes some previous experience with a particular CAD and GIS package.

  1. Student will be able to determine the organization and structure of a CAD drawing using the software available and perform the following tasks:

    1. Identify entity types and modify as needed.

    2. Identify the CAD layers and modify as needed.

    3. Identify the types of objects on each layer and if needed, further divide these objects onto layers based on feature type (point, line, polygon) if needed.

    4. Correct topology in CAD

      1. Correct overshoots/undershoots
      2. Create label points as needed.

  2. Create new CAD drawings using entities that will convert effectively to GIS features.

  3. Student will be able to determine how the GIS program will treat entities created in CAD.

  4. Student will be able to determine appropriate conversion method.


Mastery


Learning Objectives:

  1. Abstract the concepts learned from one CAD package and determine how different CAD packages are structured.

  2. Atudent will abstract the concepts learned from one GIS package and determine how different GIS packages use CAD entities.

  3. Customize a CAD package to automate the creation and modifications to entities to make them GIS compatible.

  4. Automate routine conversions between CAD and GIS.

  5. Perform conversions that require intermediate steps, for example being able to convert an AutoCAD drawing into an ArcView Shapefile, do any needed modifications in ArcView and then import this into ARC/INFO. Another example would be bringing data into a spreadsheet or database program for needed manipulations.


Follow-up Units

Suggested:

Unit 25 - CoGo
Unit 34 - Using overlay operators
Unit 35 - Point in polygon operations; Line in polygon operations


Resources


ArcCAD Texts and Resources:

Inside ArcCAD by Michael Delacy; Onward Press, 1995

Dataset Creation; course packet developed by John Schaeffer for NSF/ATE grant DUE#9553760. This packet discusses ArcCAD data structure and has a series of exercises converting an AutoCAD drawing to GIS using ArcCAD. This should be updated to AutoCAD R14 by June, 1998. Contact jschaeffer@cocc.edu or jms@bendnet.com

 

AutoCAD Texts and Resources:

Inside AutoCAD R13 by Francis Soen et al; New Riders Publishing, 1995

Harnessing AutoCAD, by Thomas a Stellman et al; Delmar Publishers, 1996

Computer Cartography; course packet developed by John Schaeffer for NSF/ATE grant DUE#9553760. This packet discusses ArcCAD data structure and has a series of exercises converting an AutoCAD drawing to GIS using ArcCAD. This should be updated to AutoCAD R14 by June, 1998. Contact jschaeffer@cocc.edu or jms@bendnet.com

Web Sites:

http://www.Esri.com--check this for information on ArcCAD, ArcView and ARC/INFO

Autodesk.com--check this for information on AutoCAD and AutoCAD MAP.



Back To Core Curriculum for Technical Programs Welcome Page

Currently maintained by Steve Palladino
Created: May 14, 1997. Last updated: October 5, 1998.
Content comments to John Schaeffer
Formatting comments to Steve Palladino