| 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.
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
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.
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.
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.
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.
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
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
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.
Learning Objectives:
Suggested:
Unit 25 - CoGo
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.