AutoCAD .dwg 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, .dwg 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 .dwg 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 .dwg 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 .dwg 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, we can use the Register pane to georegister the drawing.
If many drawings and labels are created by importing a .dwg, 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 .dwg. 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. Manifold also uses the term georegistering as a synonym for the same process.
See discussion in the DWG, AutoCAD topic, as well as related discussion in the DXF, AutoCAD topic.
In this example we import an AutoCAD .dwg file for which the coordinate system is known, because the web site from which we downloaded it was run by thoughtful professionals who provided exact information on the coordinate system their data sets use. We read the information provided and georeference it on the first try.
We visit the web site of Thurston County, in the state of Washington in the US to download data in AutoCAD .dwg format: https://www.geodata.org/DWG.aspx We also visit the web site's page on projections, at https://www.geodata.org/Projection.html, to get exact information on the projection their data sets use. The information provided is:
Thurston County, WA, USA Projection
Horizontal Coordinate Information:
Projection: State Plane
Zone: 4602 (Washington State Plane South; FIPS Zone 4602)
Datum: North American Datum 1983 (NAD 83)
Units: Feet
Spheroid: GRS1980
Vertical Coordinate Information (Contour Elevations):
Vertical Coordinate System Definition:
Vertical Datum Name: National Geodetic Vertical Datum 1929 (NGVD 29)
Altitude System Definition:
Altitude Resolution: 1.000000
Altitude Encoding Method: Explicit elevation coordinate included with horizontal coordinates
From the data download page, we download the Fullextent.zip file, which unzips into a .dwg format file called Fullextent.dwg. We import that into Manifold.
The result is a collection of many drawings, including drawings for labels layers, plus a map called FullExtent Map that has layers for all of the drawings and labels.
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 one of the drawings, called Parcels Drawing. We see it is a typical display of parcels for a county. Thurston County is located at the southernmost part of Puget Sound, with the state capital, Olympia, in the northern part of the county. Note that simply opening a drawing, without any context, provides no visual cue whether it is georeferenced or not.
Zooming in we see the drawing is very detailed. To see if, by sheer random chance, the drawing has been imported with correct coordinate system information, we can drag and drop the Parcels drawing into the map we created, that uses Bing streets as a background.
Doing that, we see that the Parcels drawing appears in Africa, in Cameroon on the border with Nigeria. Clearly, it has not been imported with the correct coordinate system.
Switching to the Info 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 press the coordinate system button to assign the correct coordinate system.
In the drop down menu, we choose Assign Initial Coordinate System and then we choose More... (not illustrated) to launch the Coordinate System dialog.
Recall the information we obtained from the Projections page on the Thurston County web site:
Thurston County, WA, USA Projection
Horizontal Coordinate Information:
Projection: State Plane
Zone: 4602 (Washington State Plane South; FIPS Zone 4602)
Datum: North American Datum 1983 (NAD 83)
Units: Feet
Spheroid: GRS1980
Vertical Coordinate Information (Contour Elevations):
Vertical Coordinate System Definition:
Vertical Datum Name: National Geodetic Vertical Datum 1929 (NGVD 29)
Altitude System Definition:
Altitude Resolution: 1.000000
Altitude Encoding Method: Explicit elevation coordinate included with horizontal coordinates
In the text above, we have emphasized the key parameters we need. Many GIS people are familiar with "State Plane" coordinate systems as used in the US, and most GIS people know they usually come in NAD83 and NAD27 versions. However, not everyone knows that State Plane systems come not just in two versions, either NAD83 or NAD27, but they also come with versions that use either feet or meters as units of measure, making a total of four variations for each State Plane coordinate system.
To find variations that use feet, in the Coordinate System dialog we click on the EPSG tab, and then we enter Washington as text into the Filter box. That reduces the list of many thousands of coordinate systems to just those with "Washington" in their names. We scroll down to NAD83 / Washington South (ftUS) (EPSG:2286), and we click on that coordinate system to choose it.
Next, we click OK.
The Info pane shows the coordinate system we have assigned, now shown in black font, since it is no longer just a temporary placeholder. If we work with other drawings that use this coordinate system, we can add it as a Favorite Coordinate System. We can then quickly assign it to all other drawings imported from the .dwg using a single click.
If we Ctrl-click on the Parcels Drawing tab to zoom the map to fit that drawing, instantly the map zooms to show the drawing is now correctly georeferenced.
Zooming in, we see very close alignment of the drawing to the "known good" background layer, Bing streets.
EPSG is easier - In the example above, we had to read the documentation on projections published on the Thurston County web site to discover what coordinate system to assign to our drawings. It is easy to make mistakes, like overlooking the need to use State Plane projection that uses feet, when looking for the right coordinate system to use. It would have been easier if the Thurston County web site simply included a note that they use EPSG:2286 coordinate system, so that we could click on the EPSG tab and enter 2286 in the filter box to zero in on the right coordinate system very quickly. However, not all GIS packages can use EPSG so not all web sites will cite the ESPG code they use.
Assign Initial Coordinate System
Example: Georegister a Vector Drawing - We take a vector drawing with an unknown coordinate system that shows the provinces of Mexico and we georeference it to a map containing a Bing Streets web-served layer, casting the Mexico drawing into Pseudo-Mercator coordinate system. We begin the process using only two coordinate points and then we do a preview to see where accuracy of the proposed georeferencing result should be improved by adding more control points. We add more control points and then georeference the Mexico drawing with good accuracy.
Example: Georegister a Drone Photo - We take a raster image, a drone photograph in Everson, Washington, that was imported from an ordinary .jpg file, and we georegister it using a map that shows a Google Satellite view of the same region, casting the drone photo into Pseudo-Mercator projection. We use previews to see how well the control points we have added will work, before creating a georegistered image.
Example: Import Shapefile and Create a Map - Step by step process to import a shapefile and to create a map.