The Complete CAD Spatial Reference
Best practices for CAD interoperability can take many forms since the use of CAD and GIS data can be very diverse. Last post I discussed the fact that it is always better (although not required) to include a coordinate projection file with your CAD drawings to define where on the world you are. If you don’t you’ll get a little annoying message telling you that the data you’ve added to ArcMap has an unknown spatial reference. Besides that ArcGIS won’t know what to do with your CAD data if it is added or copied to a map frame with a different coordinate projection. ArcGIS will use the coordinates in the drawing unmodified unless you give it more information about where on the globe the data belongs.
Another file that can be included with a CAD drawing is called an ESRI world file. This file is an ASCII file of two sets of coordinates that define a coordinate transformation. The file containts two base points and two target points. If a world file exists in the same directory with the same name as the drawing with a .WLD file extension. The four points in the world file will be used to calculate new coordinates for the drawing. With these four points there is enough information to define a MOVE, SCALE and ROTATE transformation. When data is created in page units or some local coordinate system the world file can be used to push the CAD data into its proper position. If you have 500 drawings that are all oriented correctly one to another, but are drawn in a local coordinate system, say using an origin coordinate (0,0) at the corner of some building, you can create an ESRI world file that defines the proper geographic location of that building corner (0,0) and one other point on the map and then include what the proper coordinates should be. Since each of the drawings is properly oriented one to another, you can save time by simply copying the one world file 500 time renaming it for each file name, with a .WLD extension. By also including a projection file properly named for each of the 500 CAD files, ArcGIS would have a complete and accurate spatial reference for the data in each CAD file even though the data was drawn in a local coordinate system. Better than creating a world file for each of these CAD drawings would be to use your CAD program to MOVE, SCALE and ROTATE the drawing contents into the proper coordinates space so that the ESRI world file would not be needed. World files are for people who don't have or know how to use their CAD program.
What if there was a sample tool that could control your AutoCAD application and use a single ESRI world file definition to update all your CAD drawings for you? What if this tool also allowed you to pick a spatial reference (projection file) for all of them and create the properly named file? Would that be useful to you…? Send me your comments.