SincpacC3D General Information Command Summary Quux Software

ExportKMZ

Description

The ExportKMZ command will dump Cogo Points to a KMZ file (a compressed KML file), which may be loaded into Google Earth.

In order to use this command, you must have a Coordinate Zone set in your drawing settings. IMPORTANT: Google Earth operates on WGS84 Latitude and Longitude. If you are using a coordinate system that is not based on WGS84, the resulting Google Earth placemarks will be converted to WGS84 Latitude and Longitude (if possible), which may result in differerent Latitude and Longitude than you see in your source Civil 3D drawing.

Usage

There are two primary methods of usage:

The primary difference between the two invocation methods is that the second method gives you the ability to select points by Point Group. If you do this, then the resulting KMZ file will contain one Group for each Point Group, and each Group seen in Google Earth will contain all of the points found in the corresponding Point Group in your drawing. If a certain Cogo Point is in more than one Point Group, it will also be in more than one Group in Google Earth.

If you select Cogo Points individually instead of by Point Group, you will have an option to sort the selected Points by their Primary Point Group. In this case, each selected Cogo Point will only appear once in the KMZ file, in the Group corresponding to its Primary Point Group in the drawing.

The Mapping File

You may optionally specify a mapping file. This mapping file should be a file containing a Block name and a URI for the symbol to use. Each line should contain only a single Block name, along with a URI, separated by a comma. If a line starts with a number sign ('#'), it is treated as a comment.

In addition, instead of a Block Name, you may also optionally use the names "_ACADPOINT" or "_CUSTOM" if you have selected an AutoCAD Point or Custom Marker for your Point Marker, instead of a standard Block.

When specifying the URI for the image, you may use either an image on a public web server, or an image from a local directory. If you select an image file from a local directory, that image file is copied into the KMZ file, and it will appear in Google Earth whenever your KMZ file is opened. This feature means that you may use images that are not posted to public web servers.

For example, take a look at the following mapping file:

ExportKMZ Mapping File

With this mapping file, all Point styles that use AutoCAD Points for the Point Marker will be mapped to an open diamond, and all Point Style that use the block named "CONTROL" in the Point Marker will be mapped to a triangle shape. All other Cogo Points will receive the default symbol.

Example

In the following drawing, the points with the red triangle symbols are in a Point Group called "Primary Control", and the points with the round white markers are in a Point Group called "Secondary Control". The brown point labeled "TESTHOLE" is in a Point Group called "ZX Site Feature".

ExportKMZ Sample Start

The red points use a Point Style which uses a block named "ZZ§AeccStation", as seen in the image below:

ExportKMZ Sample Point Style

In a similar vein, the Point Style for the temporary control points uses a block named "ZM_COR1", and the Point Style for the test hole uses a block called "ZZ_TESTHOLE". We will now define a Mapping file, which maps our blocks to image files as shown:

ExportKMZ Sample Mapping File

This mapping file is mapping the primary control points to a custom image on the N: drive of our local machine, and the secondary control points to a generic triangle symbol from Google's website. The test hole does not have a mapping, so it will use the default symbol selected in the dialog box when we run the ExportKMZ command.

We will now select all of the Cogo Points, and run the ExportKMZ command, which displays the dialog box seen below. In the settings, we'll go ahead and select our Mapping file. When we're happy with all the settings, we hit OK to generate the KML file.

ExportKMZ Dialog

In the above diagram, also note how we can specify a "Point Description Format". This specifies how the name for each placemark is generated. The special strings listed in the box are replaced with the corresponding value from each Cogo Point. All other characters in the Point Description Format are passed through unchanged.

And finally, here's what the result looks like when we open the KML file in Google Earth:

ExportKMZ Sample Output

Since we selected the option to group items by Primary Point Group, we have "Primary Control", "Secondary Control", and "ZX Site Features" groups in Google Earth, and each group contains the appropriate points, just as they exist in our Civil 3D drawing.

The red and orange triangle is the symbol from our local hard drive, while the white symbols are the ones from Google's servers. Notice how each point was correctly mapped to the correct image, as specified in our mapping file. And the test hole, which had no mapping, gets the default symbol specified in the command dialog box (the white circle).

See Also

Blue Dot SPCogoPtsToSHP

Exports Cogo Points to an ESRI Shapefile (SHP file), which may be loaded into other GIS applications.

Blue Dot ExportCivilStyles

Allows any or all Civil Styles in the current drawing to be exported into a selected target drawing in a single step.

Blue Dot ImportCivilStyles

Allows any or all Civil Styles in a selected source drawing to be imported into the current drawing in a single step.

Blue Dot Quick Layer Import functionality

Quickly and easily import a layer from any of a variety of sources, without interrupting the current command.