AUGI - Publishing DWG Data To Google Earth
AUGI - Publishing DWG Data To Google Earth
AUGI - Publishing DWG Data To Google Earth
GD405-1 After completing this session, you will be able to import image and terrain data into
AutoCAD-based products, use that data to help with various design and modeling tasks, and
publish DWG-based models to Google Earth for presentation to wider audiences. You will also
gain an understanding for the context in which Google Earth data should be used, and for the
various options available for publishing DWG data to Google Earth, including temporal data.
About the Speaker: Tom is a software architect for the Autodesk AEC Division. With 23
years of experience, he is an expert in the design, development, and implementation of
civil-engineering applications. For the past 9 years, Tom has helped architect Civil 3D
into the leading AutoCAD-based civil engineering application. He has degrees in
mapping, and civil engineering and surveying. His most recent side project at Autodesk
has been the implementation of the DWG publishing extension for Google Earth,
available on the Autodesk labs site and within Civil 3D.
Publishing DWG Data To Google Earth
Introduction
This class provides information on the two-way exchange of data between AutoCAD (and
AutoCAD-based verticals) and Google Earth. This exchange of data can help you in numerous
ways in your day-to-day design and engineering responsibilities. Several scenarios where this
data exchange might be useful includes:
• Import imagery from Google Earth for use as a design back drop.
• Import elevation relief data into AutoCAD to help depict as-built and proposed building
designs relative to the surface terrain.
• Publish from AutoCAD to Google Earth temporal data for a phased construction project
that can used by public agencies to depict how the project will impact residents.
The AutoCAD Google Earth publishing extension tool is available for free at Autodesk’s labs
web site, http://labs.autodesk.com.
Furthermore, AutoCAD Civil 3D 2008 includes most of the functionality described here-in.
This class utilizes several features within Google Earth extensively. There are numerous on-
line guides to using Google Earth. Four that are highly recommended are:
-2-
Publishing DWG Data To Google Earth
To publish AutoCAD models to Google Earth, you must first be able to define the location of
where the models are to be located on the Earth’s surface. This correlation of AutoCAD model
space coordinates to Google Earth latitude and longitude coordinates is referred to a geo-
referencing.
A simple method of geo-referencing AutoCAD model space data is to import an image from
Google Earth and position the image properly relative to your model data. Additionally, you can
use the imported image as a backdrop for design.
Prior to importing the image you should complete the following steps:
• Start Google Earth, and zoom to the location on the Earth’s surface where you want to
capture the image.
• Zoom in close enough to capture the appropriate level of detail of the Earth’s surface in
the area of interest.
• Be sure you are looking straight down at the Earth’s surface (that is, the view does not
have any tilt.) You can remove all tilt from the current Google Earth view by pressing the
‘u’ key.
• Generally, it is best to keep the Google Earth application window maximized. Do not
minimize or collapse the Google Earth application window.
Now you are ready to bring an image of the Google Earth view into AutoCAD.
• After selecting the command, there will be a brief pause while the image is obtained from
Google Earth. Then, a rectangle representing the border of the image will be attached to
the AutoCAD graphics cursor.
• Position the image to the desired location, and then specify a rotation angle to orient the
image as desired, or
• If AutoCAD Civil 3D 2008 or AutoCAD Map 3D 2008 is being used, and a map projection
has been defined, you can select the option at the command prompt to position the
image automatically using the map projection coordinate conversion algorithms.
• Once placed, you may use AutoCAD’s move and rotate commands to further refine the
position of the image relative to your model. Do not adjust the position of your DWG
model. Rather, adjust the position of the image relative to your model.
-3-
Publishing DWG Data To Google Earth
• The dimensions of the image in the drawing are defined by the extent of longitude and
latitude the image covers in Google Earth and a transformation of those extents to the
linear units defined by the INSUNITS system variable in AutoCAD.
• If a map projection is active within Civil 3D or Map 3D, only the center point of the image
is placed using the map projection transform algorithms. The extents of the image are
still defined as in the previous item.
• The image displayed in the drawing is an AcDbRasterImage, and is stored in the same
folder as the DWG file. The first three letters of the image file name will be the same as
the first three letters of the DWG file, and the file extension will be JPG.
• The image entity has x-data attached that contains information about where on the
Earth’s surface the image covers. This x-data is used to properly geo-reference the
model space coordinates with the Google Earth coordinates.
• The image brought into AutoCAD using this command will only be black and white, even
though the image in Google Earth is in color. This is a limitation imposed by Google
when using the Google Earth application programming interface (API). There is no way
to change this. However, see the next section for a method to manually import a color
image.
Here is an example of an image of the Venetian Hotel imported to AutoCAD from Google Earth.
-4-
Publishing DWG Data To Google Earth
Although it is not possible to import a color Google Earth image automatically, it is never-the-
less possible to display color images in AutoCAD.
Prior to importing the image you should complete the following steps:
• Start Google Earth, and zoom to the location on the Earth’s surface where you want to
capture the image.
• Zoom in close enough to capture the appropriate level of detail of the Earth’s surface in
the area of interest.
• Generally, it is also best to keep the Google Earth application window maximized. Do
not minimize or collapse the Google Earth
application window.
Next, from within Google Earth, use the File > Save >
Save Image… command to save the current Google
Earth view as a JPG image file.
Finally, from within AutoCAD, use the ImageAttach command to import the image into the
AutoCAD drawing.
Note the following items about the color image import process:
• Once placed, you may use AutoCAD’s move, rotate, and stretch commands to further
refine the position of the image relative to your model.
Here is a color image of Niagara Falls imported into AutoCAD from Google Earth.
-5-
Publishing DWG Data To Google Earth
You can import the elevation data for the current Google Earth view into AutoCAD as a mesh.
A new material is also created in the current drawing file from an image created using the
Google Earth view. The new material is assigned to the newly created mesh. With the realistic
shade mode for an AutoCAD view port turned on, the image will appear draped on the newly
created mesh.
Prior to importing the terrain data as a mesh, you should complete the following steps:
• Start Google Earth, and zoom to the location on the Earth’s surface where you want to
import the elevation data.
• Be sure you are looking straight down at the Earth’s surface. (That is, the view does not
have any tilt.) You can remove all tilt from the current Google Earth view by pressing the
‘u’ key.
• Also, for best results, zoom in close enough to capture enough detail of the Earth’s
surface in the area of interest.
• Lastly, keep the Google Earth application window maximized. Do not minimize or
collapse the Google Earth window.
Now you are ready to bring a mesh of the Google Earth terrain into AutoCAD.
• After a brief period, a mesh representing the terrain data will be attached to the
AutoCAD graphics cursor.
• Position the mesh to the desired location, and then specify a rotation angle to orient the
mesh as desired.
• If AutoCAD Civil 3D 2008 or AutoCAD Map 3D 2008 is being used, and a map projection
has been defined, you can select the option at the command prompt to position the
mesh automatically using the map projection coordinate conversion algorithms.
• Once placed, you may use AutoCAD’s move and rotate commands to further refine the
position of the mesh relative to your model. Do not adjust the position of your DWG
model. Rather, adjust the position of the mesh relative to your other model space data.
-6-
Publishing DWG Data To Google Earth
• The dimensions of the mesh in the drawing are defined by the extent of longitude and
latitude the mesh covers in Google Earth, and a transformation of those extents to the
linear units defined by the AutoCAD INSUNITS system variable.
• The image captured from the Google Earth view is saved in the same folder as the
drawing file, has the same three-letter prefix as the first three letters in the drawing file
name, and has a JPG extension.
• The material created in the drawing is named using the first three letters of the drawing
file, followed by several random numbers.
• The material created from the image brought into AutoCAD using this command will only
be black and white, even though the image in Google Earth is in color. This is a
limitation imposed by Google when using the Google Earth application programming
interface (API). There is no way to change this. However, see the next section for a
method to manually drape a color image onto the mesh.
Here is the Matterhorn area in the European Alps imported as a mesh with a material.
-7-
Publishing DWG Data To Google Earth
You can create AutoCAD materials from images saved from Google
Earth. These materials can then be applied to AutoCAD entities.
Next, from within Google Earth, use the Save Image… command to
save the current Google Earth view as a JPG image file.
-8-
Publishing DWG Data To Google Earth
Users of AutoCAD Civil 3D 2008 can import terrain model data from Google Earth directly into a
Civil 3D surface object. The subsequent surface object can then be visualized with more than
ten different styles.
To import terrain data to a Civil 3D 2008 surface object, follow these steps:
• Start Google Earth, and zoom to the location on the Earth’s surface where you want to
capture the terrain. Ensure that you are looking straight down at the Earth’s surface.
• Zoom in close enough to capture the appropriate level of detail of the Earth’s surface in
the area of interest.
• Generally, it is also best to keep the Google Earth application window maximized. Do
not minimize or collapse the Google Earth application window.
From within Civil 3D, use the ImportGESurface command to collect the terrain data from Google
Earth.
If no map projection is defined, then specify the origin and rotation of the surface data. With a
map projection defined, you can have Civil 3D automatically transform the Google Earth
longitude and latitude coordinates to the AutoCAD world coordinates.
Finally, specify the name, description, and display style of the new surface.
Note the surface data is imported as a matrix of points. You can specify the number of points in
the matrix using Civil 3D’s Settings > Surface > Commands > ImportGESurface > Google Earth
Options > Rows and Columns settings. The default is 100 rows and 100 columns, for a total of
10,000 points resulting in
approximately 20,000 triangles.
-9-
Publishing DWG Data To Google Earth
Map Projections
Numerous books have been written on techniques to map items on the Earth’s curved surface
to planar surfaces. We will not delve into much detail here other than to note the following
items:
• AutoCAD does not have the inherent notion of distance linear coordinates, so the value
of the AutoCAD insertion scale, INSUNITS, system variable is used. Use the ddunits
command to set that value.
• When no map projection has been defined, an approximate formula is used to convert
between the Google Earth and AutoCAD coordinate systems.
• When using the publishing tool with AutoCAD Civil 3D 2008 or AutoCAD Map 3D 2008,
and a formal map projection has been defined using commands available within those
products, a much more rigorous set of formulae are used to convert between the two
coordinate systems.
• These more precise conversion methods provide suitable transformations over larger
distances and areas.
- 10 -
Publishing DWG Data To Google Earth
To publish model space data to Google Earth, use the PublishKML command.
- 11 -
Publishing DWG Data To Google Earth
10: Specifies that the map projection defined in the drawing should be used to transform from
AutoCAD coordinates to Google Earth coordinates. (For use with AutoCAD Civil 3D 2008 and
AutoCAD Map 3D 2008 only.)
- 12 -
Publishing DWG Data To Google Earth
21: Controls how the model space Z-coordinate of entities is mapped to elevations in Google
Earth. You can specify that model space Z-coordinates are:
• Relative elevations: added or subtracted to the elevation of the Earth’s surface in the
area where the model is being published.
• Drape: Ignores the Z-coordinate value of entities, and uses the elevation of the ground
where the entity is located.
22: Defines the file name of the published data file for use in Google Earth. Extensions of KMZ
(compressed) and KML (uncompressed) are both recognized by Google Earth. Published DWG
models can result in large data files if the KML extension is used. A large reduction in file size
will occur when using the KMZ extension. Note that when publishing materials (item 9) an
extension of KMZ will always be used.
23: Initiates the publishing process and creates the data file.
24: Opens the published data file in Google Earth, and zooms to the area where the published
data is located.
Here is an example of AutoCAD building model (left) published to Google Earth (right).
- 13 -
Publishing DWG Data To Google Earth
The following items are important to note about the publishing process:
• Published models can be shared with others by simply sharing the published data file.
• You can share models with others using Google’s 3D Warehouse located at
http://sketchup.google.com/3dwarehouse/upload_details?webupload=true&uptyp=mn.
• DWG model data is grouped under the Model folder in the Google Earth Places pane.
• Cameras and paths are grouped in the Cameras and Paths folders in the Places pane.
• Colors of published entities in Google Earth are closely matched to AutoCAD colors.
• When using the publishing tool within AutoCAD Civil 3D 2008 or AutoCAD Map 3D
2008, and a map projection is defined, the default behavior is to automatically use the
map projection formulae (item 10) to convert from drawing coordinates to Google Earth
coordinates. You can optionally manually define the AutoCAD to Google Earth
coordinate transformation on the Geo-Reference page of the publishing wizard (item 11),
but a more accurate conversion is possible if the automatic map projection
transformation is used (if one is available).
• When publishing materials (item 9), Google Earth limits the model size to 21845
triangles when materials are included. If your model is larger than this, publish the
model several times in smaller partitions.
• When publishing materials (item 9), the data file will always have a KMZ extension.
• When publishing Entity Information (item 8), additional attribute information associated
with the entities is viewable in Google Earth by clicking on the Model item in the Places
pane. A pop-up window anchored on the entity in the Google Earth view will list the
attribute data. The attribute information published varies by product:
AutoCAD Product Entity Attribute Information Published
AutoCAD 2008 None.
Civil 3D 2008 Predefined set of attributes that varies by entity type.
Map 3D 2008 Predefined set of attributes that varies by feature type.
Architecture 2008 Utilizes Property Set data. See AutoCAD Architecture 2008 help for information
on attaching Property Set data to entities.
- 14 -
Publishing DWG Data To Google Earth
Google Earth provides the ability to conditionally display published model data based on start
and end times attached to each piece of model data. These start and end times are referred to
as an entity's time span. This is a useful tool where you need to present development progress
over a period of time. Attaching time span information to AutoCAD entities is entirely optional. If
you decide to attach start and end times to AutoCAD model space entities when the model is
published to Google Earth, you can use the timeline tool within that application to control the
display of the model data.
Prior to attaching time information, you should analyze your model and decide on the best
technique to associate time with the various entities. This will vary from model to model. For
example, for a structural framing model, you might associate one time span with the first floor
columns, a second time span with the second floor beams, and so on. Using this technique
would allow you to animate the upward construction of the building framing.
To attach time span information to AutoCAD entities prior to publishing the data use the
GETime command.
2: Drag these range markers to the right or left to re-define the time range of data displayed.
3: Click this to play an animation of the sequence. This works best if you move the range
markers to define a time range smaller than the whole set.
- 15 -
Publishing DWG Data To Google Earth
Note the following important points related to attaching time information to model space entities:
• If a start time is not attached to an entity, then the entity will display starting at the
beginning of the time slider tool in Google Earth.
• Similarly, if an end time is not attached to an entity, then the entity will display from the
start time through to the end of the slider bar.
• An entity without any time span information attached to it will always be displayed in
Google Earth.
• Time information associated with AutoCAD model space entities is attached to those
entities using X-Data.
• Time span information attached to entities in models is not published when materials are
published; either time information can be published or material information can be
published, but not both.
• If you hover over an entity with time span data attached, a tooltip with the start and end
times will be displayed.
• Existing time span data attached to an entity can be updated by rerunning the GETime
command on the entity.
- 16 -
Publishing DWG Data To Google Earth
This presentation has concentrated on AutoCAD and the AutoCAD-based vertical applications
interaction with Google Earth. Autodesk’s Revit Architecture and MapGuide products also can
also send data to Google Earth.
The following table delineates the various types of data exchange that can currently occur
between Autodesk products and Google Earth.
Import GE Supports
Import GE Import GE Terrain Publish to Map
2008 Product Image Mesh Model GE Time GE Projections
AutoCAD 9 9 9 9
AutoCAD Civil 3D 9 9 9 9 9 9
AutoCAD Map 3D 9 9 9 9 9
AutoCAD Architecture 9 9 9 9
MapGuide 9 9
Revit Architecture 9 9
- 17 -
Publishing DWG Data To Google Earth
Google Earth has digital elevation model (DEM) data collected by NASA’s Shuttle Radar
Topography mission. In Google Earth, the resolution of the cells of the source data is
approximately 30 meters over United States territory; for the rest of the world, only 90 meter
spacing has been made available. Google Earth has improved their results using a specialized
interpolation process, and by adding data from other sources. Since 2006, the 3D views of
many areas around the globe, including many prominent mountains, have been improved by the
use of supplementary DEM data to fill the gaps in the SRTM coverage. Elevation data was
recently updated to 10-meter resolution for much of the Unites States and several other parts of
the world. In summary, terrain data varies by country from 10- to 90-meter resolution.
Elevations below sea level (e.g. Death Valley, CA and the Dead Sea) are presented as sea
level.
The accuracy of image data in Google Earth also varies by locale. Most land is covered in at
least 15-meters of resolution per pixel, with some areas (e.g. Las Vegas, NV and Cambridge,
MA) at the very high resolution of 15 centimeters per pixel. Certain locations around the world
use ortho-rectified imagery. Improved imagery for locations around the world is updated on an
on-going basis. The imagery is generally current to within three years.
To import terrain and image data from Google Earth to AutoCAD, the publishing tool utilizes
several public Google Earth Application Programming Interface (API) function calls.
Every image created from Google Earth using satellite data provided by Google Earth is a
copyrighted map. Any derivative from Google Earth is made from copyrighted data which,
under United States Copyright Law, may not be used except under the licenses Google
provides. Google allows non-commercial personal use of the images as long as copyrights and
attributions are preserved. You should respect licensing requirements of Google Earth. See
the following links for more information:
• http://earth.google.com/intl/en-US/licensepro.html
• http://earth.google.com/support/bin/answer.py?answer=21422
- 18 -