GIS Matters: Convert CAD Data to GIS

A 680Kb PDF of this article as it appeared in the magazine—complete with images—is available by clicking HERE

Surveyors have been using Computer Aided Drafting/Design (CAD) for decades to draft surveys and to do design. As society becomes more spatially conscious, the ability to integrate data with geographic information systems data increases and is now to the point where CAD-GIS integration is expected by clients and necessary as part of the analysis and design of many survey projects.

With the appropriate GIS software, one may directly view CAD files and CAD features in a GIS environment in order to display a visual representation of the CAD elements in context with GIS data. Alternatively, one can display GIS data in CAD software. However, in order to empower the CAD data for GIS spatial analysis, the CAD features should be converted to a GIS format that have feature attributes assigned to them. This article explains the simple steps necessary to convert CAD data to GIS format. Our example dataset includes the water lines of a small municipality. The water lines are polyline entities in an AutoCAD drawing that has a layer schema that defines the pipe diameters (a layer for each pipe size). The city has used the CAD as a basic inventory map to show what the city owns, and where the pipes are located, purposes for which the CAD model adequately meets the needs. Now, however, the city would like to do a number of other tasks which can be more easily done with GIS, such as: quickly query the database for inventory and reporting, take the data into field to navigate to manhole locations with GPS, edit and update features and attributes while in the field, perform connectivity analysis, quickly and easily generate reports, create maps with aerial photography and other GIS data such as parcel ownership and utility maintenance districts, perform capacity analysis, and do build-out modeling. Because of these needs, the city wants to convert the CAD data to a GIS format.

Data Types in CAD Versus Data Types in GIS
All GIS data are representational, that is, the GIS graphical data represent the real world data in a symbolic manner. CAD data are also representational although the data model varies from the GIS data model. CAD data generally represent large-scale objects while GIS data represent smaller scale. In our example project dataset, the CAD data consist of points, text, polylines, multipatches, and polygons (Figure 1). The features of a CAD dataset fall into one of these feature types and also have other characteristics such as color, linetype (Figure 2). When the CAD dataset is loaded into GIS, the features are organized into the appropriate feature type, and features characteristics are represented as attributes of the feature. Figure 3 shows the CAD characteristics as attributes of one of the water lines in the dataset (interpreted as a polyline in GIS). When we convert the CAD data to a GIS model, we may choose to retain those characteristics or not.

Spatial Reference
Since GIS data are always contained within a defined geographic space, the CAD data must also conform to this requirement in order to align with other geographic data. If the CAD data are not already georeferenced, as in Figure 4, then they must be spatially referenced to a coordinate system, datum, projection, and units that the GIS software can interpret. Ideally, the CAD data would have the same spatial reference as the GIS data, but as long at the GIS software can interpret the spatial reference, and if the GIS software can project data on-the-fly, then the CAD data should align well with the GIS data.

In order to geospatially reference data, one must either collect all the data with geospatial coordinates, or tie a few control points to a known reference system then compute the spatial coordinates of the remaining CAD data. In this example we will perform a geographic transformation on the CAD in the GIS environment using State Plane coordinates of some survey points. The transformation will translate, rotate, and scale the CAD data into geographic space.

ESRI’s ArcMap provides tools for projecting CAD into geographic space, by entering coordinates for known control points, or by clicking on GIS features to associate CAD points to GIS points. For this project we have a CAD dataset which is in assumed coordinates, however, we do have some survey points with State Plane coordinates which we can tie to identifiable features in the CAD dataset. We can use the survey points to georeference the CAD by selecting each associated CAD point, then clicking on the survey point as a means to identify the from and to coordinates for a geographic transformation in scale, rotation, and transformation (Figure 5). The result of the georeferencing operation is a CAD dataset in geographic space, which the GIS software will align with other GIS data. After georeferencing the municipal CAD dataset into State Plane coordinates, the water line features now align with the aerial imagery–see Figure 6 where the georeferenced CAD data (blue lines) run along the streets in the photography.

Creating the GIS Data from the CAD Features
After the CAD file is georeferenced, we can select the specific CAD entities that we wish to convert to GIS format, then export those features to GIS. In this project we selected only those objects that were polylines contained in certain CAD layers. We did this by querying the CAD database using a SQL query, which identified and selected all the features in the appropriate layers (Figure 7). We then export the selected CAD objects to shapefile, which we can then load into the map.

Notice in Figure 8 that the shapefile of the water lines contains some attributes based on the original CAD data. These are attributes that the GIS export operation automatically assigned to the dataset. With a little bit more work, we could add other attributes which we could populate in order to facilitate symbolizing, querying, analyzing and displaying the data. For example, we might create a field called PipeSize to populate values based on the layer names that came from the CAD, or we could add a field for the date that the pipe was installed. Additionally, once we convert the CAD data to GIS format, we can perform data integrity operations, such as running rule-based topological checks to ensure that the lines are connected, or we could perform SQL queries on the attributes to find invalid entries, and so forth.

Rj Zimmer is Director of GIS and Mapping for DJ&A, PC of Montana, an engineering, surveying, and mapping consulting company.

A 680Kb PDF of this article as it appeared in the magazine—complete with images—is available by clicking HERE