Example: Import AutoCAD DXF and Georeference

AutoCAD .dxf format is a CAD format that may be encountered in GIS.  The format is a very poor choice for GIS work since it saves neither database information for attributes nor projection settings. Not surprisingly, .dxf format is used mostly to save CAD work such as diagrams of facilities and other CAD drawings created without any sense of projection or geographic location.  

 

An individual .dxf file can contain many vector layers, which will be imported as many drawings into the Manifold product, as well as text layers, which will be imported as labels, with the drawings underlying those labels also automatically created.  A map will automatically be created with all the drawings and labels as layers in the map.

 

 After importing data from AutoCAD .dxf we must manually specify the coordinate system by using the Assign Initial Coordinate System dialog.   If we are lucky, the source from which we obtained the .dxf will have provided some documentation telling us what coordinate system we must manually specify.  If we are unlucky, we will have to guess at the coordinate system or, if we cannot guess successfully, undertake a tedious process of manual georeferencing.    

 

If many drawings and labels are created by importing a .dxf, once we georeference one of the drawings we save the coordinate system that works as a Favorite, and then easily apply it to all the other drawings and labels also imported from that .dxf.    Georeferencing is the process of specifying the correct coordinate system for a drawing, so that it appears in the correct geographic location, orientation, and scale on a map of the Earth.

 

See discussion in the DXF, AutoCAD topic, as well as related discussion in the DWG, AutoCAD topic.

A Lucky Guess

In this example we import an AutoCAD .dxf file for which the coordinate system is unknown.  We make a lucky guess and georeference it on the first try.  This approach works surprisingly frequently.

 

We import from a file called bclandg.dxf found in our organization's archives in a folder called "British Columbia."  Other than guessing the file has something to do with British Columbia, in Canada, we have no other information on the .dxf file.   We import the bclandg.dxf file into Manifold.

 

 

The result in the project is a collection of seven drawings, plus a map called bcvlandg Map.  

 

In the illustration above, we have also created a new map, called Map using a Bing streets web server as a base layer. We will use that new map with the Bing layer as a background to help verify we correctly georegister the layers we imported from the .dwg.   We begin by georegistering one of the drawings.

 

 

We pop open bcvlandg Map to see what it contains.  From the outer boundaries of the data, it is clearly a map with layers showing data in British Columbia.   Experienced GIS people will also note the horizontally "stretched" appearance it has, which is characteristic of data in Latitude / Longitude coordinate system.

 

 

Switching to the Component pane, we see that Manifold has imported the drawings and assigned Pseudo Mercator projection, shown using red font to emphasize it is just a temporary placeholder, to the map, as well as to all of the drawings in the map.  

 

We begin by georegistering one of the drawings.

 

 

We pop open the drawing called 15 Drawing to see what it contains.  

 

 

We drag and drop the 15 Drawing into the map we created, that uses Bing streets as a background.   The drawing appears as a dot off the coast of Africa, clearly indicating the projection it uses is not Pseudo Mercator.   Experienced GIS people will guess that the drawing might use the Latitude / Longitude coordinate system, since Lat / Lon data often appears as a dot off the coast of Africa when the data is interpreted as Pseudo Mercator.

 

 

In the Component pane, we see that Manifold has imported the drawing and assigned Pseudo Mercator projection, shown using red font to emphasize it is just a temporary placeholder.    We will assign the coordinate system to Latitude / Longitude, to see what happens.

 

We press the coordinate system button to assign the correct coordinate system.

 

 

In the drop down menu, we choose Assign Initial Coordinate System.

 

 

We continue on to choose Latitude / Longitude, which is one of the default Favorite Coordinate Systems.

 

 

Instantly, the drawing moves to the correct position, which we can see by Ctrl-clicking the 15 Drawing layer tab to zoom the map window to fit the drawing.

 

 

The Component pane shows the coordinate system we have assigned, now shown in black font, since it is no longer just a temporary placeholder.   Since Latitude / Longitude is a default Favorite Coordinate System, we can quickly assign it to all other drawings imported from the .dxf using a single click.

Notes

Latitude / Longitude is popular - If we have no idea what coordinate system to use for a CAD drawing that shows some reasonably large geographic extent, guessing Latitude / Longitude works surprisingly often.    People who use CAD systems to show geographic data may not have a very wide understanding of coordinate systems, but if they only know one coordinate system it is likely to be Latitude / Longitude.

See Also

Assign Initial Coordinate System

 

Coordinate System

 

Favorite Coordinate Systems

 

DWG, AutoCAD

 

DXF, AutoCAD

 

Example: Import Shapefile and Create a Map - Step by step process to import a shapefile and to create a map.