How To: Transform CAD data in ArcMap to line up with other data
Instructions provided describe the steps to transform CAD data using a world file. Using a world file, the CAD data display is moved from the current location to the same coordinate space as the other GIS data.
The process in this article does not work in ArcGIS Desktop version 9.2 unless Service Pack 6 is installed.
CAD (Computer Aided Design) files, whether .DWG and .DXF files from AutoCAD, or .DGN files created in Microstation, can be displayed in ArcMap. Many CAD files are created in a local coordinate system, and must be transformed or moved, to align with GIS data in a real-world coordinate system.
This process does not work if there are spaces in the name of the CAD file. CAD files cannot be renamed using Windows utilities to remove spaces - the files must be renamed in the native application.
This process makes no permanent change to the spatial location of the CAD file itself. Only the display of the data in ArcMap is changed.
Open ArcMap with a new, empty map. a) Click the Add Data button, go to the directory where the CAD data is located, and double-click the blue icon. b) Add only the polyline layer to ArcMap.
Transforming one type of feature from the CAD file transforms the entire file, and all features. In most CAD files, there are more polyline features than other types, so using this feature type makes the transformation process more efficient.
a) Click the View menu > Data Frame Properties > General tab. Set the Map Units to the units that were used to create the CAD file. The units are often feet or meters, although inches, centimeters or even millimeters may have been used. If the units that were used for file creation are unknown, select feet. b) After setting the Map Units, the Display Units becomes active. Set the Display Units to match the Map Units. c) Click Apply and OK in the Data Frame Properties dialog box.
a) Go to Insert > New Data Frame, adding a new Data Frame to the map document. b) Click the Add Data button and select the reference data. The reference dataset can be a shapefile, coverage, geodatabase feature class, or even an image.
• The reference data must contain features that can be matched exactly to features in the CAD data.
• The reference data must be in the coordinate system to which the CAD data is transformed.
• The reference data must have the projection defined.
• The reference data must be projected in the same units as those used to create the CAD file.
• Do not use reference data in a geographic coordinate system.
Compare the CAD polyline layer with the reference layer and identify two points to be used for the transformation. • These points must be as far apart as possible. For example, if one reference point is in the northeast corner of the CAD data, the second point should be in the southwest corner.
Using the Zoom In tool in ArcMap, zoom in on the first control point in the CAD polyline layer to be used for the transformation. Zoom in until the Map Scale displayed on the Standard Toolbar reaches 1:1.
a) On the Drawing Toolbar, click the drop-down arrow next to the 'New Rectangle' tool, represented by the white square. b) Select the 'New Marker' tool, and click to create a new marker on the point in the CAD data selected in Step 5. c) Double-click the marker symbol, and select the 'Size and Position' tab.
WordPad cannot be used for this process. WordPad adds formatting characters to the file, which causes the transformation to fail.
a) Select, right-click, and copy the X-coordinate displayed on the 'Size and Position' tab for the marker symbol added to the map in Step 7. • Copy only the number. Do not copy the space after the number, or the abbreviation for the display units.
For example: X: 1234.5678 ft Copy only 1234.5678
b) Paste this number into the first position in the Notepad file, and type a comma following the X-coordinate.
a) Select the Y-coordinate value from the 'Size and Position' tab, and paste that coordinate immediately after the comma following the X-coordinate in Notepad.
The Notepad file is formatted as: 1234.5678,3456.7891
b) After pasting the Y-coordinate, press the spacebar key to add a space character after the Y-coordinate.
a) Zoom to the full extent of the CAD polyline layer, and zoom in on the second control point used to transform the data, as outlined in Step 5 above. b) Repeat Steps 6 through 9, copying and pasting the coordinates for the second control point into the same Notepad file.
The Notepad file is now formatted as: 1234.5678,3456.7891 2345.6789,4567.8912
c) Again, press the spacebar after the Y-coordinate on the second line.
a) In Notepad, go to File > Save As, and navigate to the directory on the computer where the CAD file is saved. b) In the lower portion of the Save As dialog box, change 'Save as type:' to 'All Files'. The Encoding remains ANSI. c) Type in the file name, which cannot contain spaces, and add a .WLD extension. For example, if the CAD file name is Parcels020313.dwg, the world file name is Parcels020313.wld.
Return to ArcMap, and activate the New Data Frame. Right-click the title of the New Data Frame, and select 'Activate' from the drop-down menu.
a) Using the Zoom In tool, as described in Step 5 above, zoom in on the control point in the reference data, to which the first control point from the CAD file is transformed. b) Repeat Steps 6 through 9 above to capture the coordinates of the control point, and paste the coordinates into the Notepad file, as shown below. There is a space between the CAD-X, CAD-Y, and the REF-X, REF-Y.
The Notepad file is now be formatted as: CAD-X, CAD-Y REFERENCE-X, REFERENCE-Y 1234.5678,3456.7891 411768.56278,5896292.45211 2345.6789,4567.8912
c) In Notepad, click File > Save.
a) Zoom in on the location of the second control point in the reference data, as described in Step 5. b) Repeat Steps 6 through 9, to capture the coordinates for the second control point from the reference data. c) Copy and paste those coordinates into your Notepad file, on the second line, following the CAD-X, CAD-Y (space).
The NotePad file is formatted as: CAD-X, CAD-Y REFERENCE-X, REFERENCE-Y 1234.5678,3456.7891 411768.56278,5896292.45211 2345.6789,4567.8912 409225.37689,5854873.45661
d) In Notepad, the completed file will look as follows. There are no headings. Click File > Save. 1234.5678,3456.7891 411768.56278,5896292.45211 2345.6789,4567,8912 409225.37689,5854873.45611
With the world file constructed and saved, it is now possible to transform the CAD data. a) Activate the Data Frame which contains the CAD data. b) Right-click the name of the CAD layer, and go to Properties. c) Select the Transformations tab, and check the box in the upper-left corner labeled 'Enable Transformations'. d) Using the Browse button, browse to the location where the world file is saved, select the file, and click Open. e) In the Layer Properties dialog box, click Apply and OK. The CAD features disappear from the Data Frame.
a) Drag and drop the reference layer from the second Data Frame into the Data Frame containing the CAD data. b) Right-click the CAD layer name, and select Zoom to Layer. The CAD data has been transformed to overlay with the other data in a real-world coordinate system.
The world file (.wld) created in the steps above can also be accessed on the Transformations tab with the Rotate, Scale and Translate option. The coordinate pairs on the first line of the world file are used as the coordinate input with Rotate, Scale and Translate.
At 9.2 and later versions: the World File (.wld) can also be accessed through the Georeferencing Toolbar > View Link Table button > Load button.
Export the CAD layer to a shapefile or geodatabase feature class, and define the projection for the new dataset to match the other data. a) Right-click the CAD layer, select Data > Export data. b) Browse to a suitable location for the new dataset, name it, and click OK.
Shapefile or geodatabase feature class names cannot contain spaces. Use underscores instead of spaces.
For instructions on defining the projection of the new shapefile or feature class, see the Esri Knowledge Base article about understanding the use of map projections in ArcGIS in the Related Information section below.
At versions 9.3.1 and 10.x of ArcGIS Desktop, CAD data can also be aligned in ArcMap using the Georeferencing toolbar. Steps for the process are outlined in the Help documentation.